During my Corporate Tableau Training in Gurgaon , i get questions many time regarding Sorted Stacked Bars in Tableau . Creating a Stacked bar in tableau is quite easy.
Stacked bars are best used to analyze two dimensions against a single measure. Let’s take it with a proper use case and since we are very comfortable with Sample Superstore data set we will use the same for this analysis.
There is a popular saying If you give a man Fish Daily to eat he will survive as long as he is getting the Fish , but If you teach him how to Fish he will Live his Life Time . So a Real Teacher is one who can sow the Seed of Curiosity , that motivates the students to get on the Path .
So Let’s Follow a Different Approach this time . Rather than me showing you all the steps , I will just write down all the steps required and you need to follow it along and you will get what we want. There will be some challenges and you will need to explore more and think a little more but that is what is expected. If you get stuck somewhere for a large duration of time you can email me at info@Instrovate.com and i can help you answer where you are getting stuck . So go ahead and Follow along –>
Analysis: we want to analyze the Sales of all the Sub Category in the various Region.
Step Ahead 2: We have a Sorted Stacked bar now, but the analysis of those Stacked bars whose overall Sales is less is not easy as the length of these bars are very small; like for example for Fasteners, Labels, Envelopes etc.
In case you don’t want to analyze the total Sales of each of the Sub Categories but only the Sales per Region in that case you can create Equal Size Sorted Stacked Bars.
To create Equal Size Sorted Stacked Bar create a Calculated Field called Size .Bring this new created Field to Row in the viz and change the Aggregation to minimum like below:
Now we can remove Sum(Sales) from the Rows and we have Equal Size Sorted Stacked Bars . This viz is good to show the Sales of the Sub Category in the Various Region & at the same time it is also telling us which Region is leading the Sales for that particular Sub Category.
If you get stuck somewhere for a large duration of time you can email me at info@Instrovate.com and i can help you answer where you are getting stuck .