At our company, we reviewed sales reports using Tableau stacked bar charts. This chart shows us the total sales for each category, but bigger categories like Technology always take up most of the space. As a result, it becomes difficult to see how smaller categories or their subcategories are performing.
Along with the total sales numbers, the management also wanted to know the percentage share of each sub-category within its category. For example, instead of just knowing that Chairs made $50,000 in sales, they wanted to see that Chairs contributed 60% of the total Furniture sales.
As a solution for this, we used a 100% stacked bar chart in Tableau. This chart displays every bar at 100%, and the segments within the bar represent the percentage share of each sub-category.
In this Tableau tutorial, I will explain how to create a 100% stacked bar chart in Tableau.
Tableau 100% Stacked Bar Chart
In Tableau, a 100% stacked bar chart is a type of bar chart where each bar represents 100% of a category’s total. The segments or stacks within the bar indicate the percentage contribution of each part to the total. Unlike a standard stacked bar chart that displays actual values, a 100% stacked bar chart focuses on relative shares or proportions.
Create 100% Stacked Bar Chart in Tableau
To create a 100% stacked bar chart in Tableau, we will use the Tableau Superstore dataset. In this stacked bar chart, we will show the sales of categories across regions.
To create a 100% stacked bar chart in Tableau, there are two methods that we will discuss in the points below.
- Create 100% Stacked bar chart in Tableau using Table Calculation
- Create 100% Stacked bar chart in Tableau using dual axis
Create 100% Stacked Bar Chart in Tableau Using Table Calculation
Now, connect the tableau to the data source and follow the steps below to create a 100% stacked bar chart in Tableau using table calculation.
- For the stacked bar chart, add ‘Sales‘ to Rows, ‘Regions‘ to Columns, and ‘Category‘ to Color card in the Marks section.

This will stack the sales of the category for regions in each bar.
- For the measure value, add the Sales(SUM) to the Label card in the Marks.

- For 100% stacked bar chart, we need to convert the number into a percentage. For this, click on the Sales label in the Marks and select Format.

- In the Format select Pane -> Default -> Numbers -> Percentage. We can also remove the decimals from the percentage by selecting Decimal Places as 0.

- Now, the percentage will display the sales figures as a percentage. To get the total percentage, select SUM(Sales) -> Quick Table Calculation -> Percent of Total.

- Now, we will have the sales percentage share of each category for the region. To make these percentages 100% for each bar, select SUM(Sales)-> Edit Table Calculation.

- In the table calculation, select the Compute Using as Table(down).

Now, we can see the percentage as 100% for each bar in the Tableau stacked bar chart.

This way, we can create a 100% stacked bar chart in Tableau, following the above steps.
Create 100% Stacked Bar Chart in Tableau Using Dual Axis
Another method through which we can create a 100% stacked bar chart in Tableau is by using a dual-axis chart.
This method is ideal when you want to show the percentage contribution of a category while also highlighting the remaining part up to 100%.
Follow the steps below to create a 100% stacked bar chart in Tableau, using the dual-axis chart.
- Add a segment, such as Sub-category, to the Rows.

- Create a calculated field using the formula below. This will calculate the contribution of each sub-category to the total Sales.
SUM([Sales]) / TOTAL(SUM([Sales]))
- Change the format of the calculated field to a percentage. For this, click on the field in the sidebar and select Default Properties -> Number Format. In the format, select “Percentage” and click OK.

- Now, add the calculated field “% of Sales” to the Columns. Near the calculated field, add one more measure. To do this, click on Columns and write AVG(1). With this, we will see two sets of bars.

- To create the stacked chart, click on the AVG(1) in the Columns and select Dual Axis.

- With this, a dual-axis chart will be created. Now, change the Marks type to Bar chart for both charts. For this, you can select Bar in All Marks, which will set the mark type to bar in both charts.

- To show the 100% stack for each category or the sub-category, assign a different color to both charts.
- Now, in Mark’s section of AVG(1), click on the Color card, reduce the color opacity so that ‘% of sales’ is visible on the same bar.

This will create the visual as the actual sales percentage stacked with the 100% limit in the bar.
- Now to show the percentage up to 100 on the axis, right-click on the ‘% of Sales‘ axis and select Edit Axis.

- In the edit axis, select Tick Marks > Range > Custom. In the custom range, select Fixed start as zero and Fixed end as 1.

This will create a range of percentages from 0 to 100 on the X axis.
- At last, sort the categories according to their share in descending order using the sort button in the nav bar. To show the sales % in the bars, add the calculated field “% of Sales” in the Label card.

This way, we can create a 100% stacked bar chart in Tableau using a calculation field in a dual-axis chart.
Conclusion
In this Tableau tutorial, we have learned how to create a 100% stacked bar chart. In the above examples, we created a 100% stacked bar chart using the table calculation to show the share of sales in each category with 100% bar measure.
In another method, we created a 100% stacked bar chart using the Dual-axis chart. In this, we displayed the sales share of each sub-category as a percentage of the total 100% in the bar.
You may also like to read:
- Create a Circle Timeline Chart in Tableau
- Create Slope Chart in Tableau
- Create a Control Chart in Tableau
- Create Candlestick Chart in Tableau
- Tableau Combination Chart
- Sort Values in Tableau Stacked Bar Chart
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.