So I think this is what you want...
first I created a calculated field, to group all the 'non-superstore' initiatives into a single group
[Bar Chart Grouping]
which I can then bring onto the colour shelf, and Tableau will stack my bars to these 2 levels.
To get the total label, I've used a reference line (where I set the line to none and bring in the value). Image below shows the set up for the reference line
Hope that helps, and makes sense.
Grouping for Bar Chart.twbx 34.1 KB
Hi Simon - Thanks for replying !!
What you suggested works for Superstore alone. But doesnt work if the initiative selection is dynamic. For eg : If Initiative selected is "Shakti" then the calculation should be
Can this be done?
So one way to do this is to use a parameter instead of the 'hard-coded' text in the formula.
You can set up a parameter from a field (or import a fields LoVs)...and expose this to the user. As they change the parameter the selection will update accordingly. One thing to note, although you can set up a parameter from a field, it's not dynamic, so if new values appear in that field (after a data refresh), you'd need to add any new values to the parameter.
Does that work for you? or does the data change too much (i.e. you don't want the maintenance overhead)