I think this is what you're after:
I did quite a few things to get this working:
- duplicated the datasource (to keep your existing sheets working)
- pivotted the data (I didn't bother with renaming the resultant fields)
- change Pivot Field Values to a dimension
- Create a graph:
- Pivot Field Names on Columns
- Sum(Number of Records) on the Rows
- Pivot Field Values on Color
- Change SUM(Number of Records) to Percent of Total
- Change Compute Using to Table (down)
- Turn on labels
- Re-order the legend
Sample CM.twbx 153.4 KB
Thanks for the reply! The graph is indeed what I'm looking for,
I am trying to replicate the steps you've mentioned.
However I'm not able to open the Tableau file, it's giving me multiple errors. I'm currently on Tableau 10.2, Any thoughts?
Hi Chris, I just had one additional question that I wasn't able to solve for. In this above graph, is there a way to put the biggest bucket on the bottom for each bar? I tried sorting on Pivot Field Values based on count(number of records) however the issue here is it calculates this number of records across bars. So basically if on bar 2 there were more 2s than 1s, but the total number of 1s over the 3 bars was more than the total number of 2s, then on Bar 2 the region representing 1 was still below the region for 2 although the latter was a bigger chunk. Any thoughts on how to sort these colors within a bar as opposed to one common sort across bars?
Sorry, I don't think there's a way to sort each individual bar
If someone else knows, I'd love to learn though
Thanks Shin! Made my day a whole lot easier
You are very welcome.