Dynamic number of series in stacked bar

cr731

Well-known Member
Joined
Sep 17, 2010
Messages
611
I have a stacked bar chart where there is a field called Category that I would be placing in the Series section so that each category is its own color.

The problem is - when there are no slicers applied, there are about 20 categories, making the chart very difficult to read. Therefore, my ultimate goal is that if no slicer is selected on category, then I would see just one solid bar. But if the user selects, say, just 2-3 slicer items, then I would get the 2-3 "stacks" of the bar to distinguish the categories.

Is this in any way possible using some sort of DAX function...? I'm still new to DAX but was wondering if maybe something with SUMMARIZE would do anything for me in this case?

I can't use macros because this is a chart that will go onto SharePoint.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
This is not really about DAX but about graphs and pivot tables. How does the graph know what you mean? Sometimes it has to show multiple series, sometimes it has to aggregate them. I don't think this is possible. The only way I can think of is to Use VBA to colour the segments the same colour so they look like one - but VBA is out.
 
Upvote 0

Forum statistics

Threads
1,224,155
Messages
6,176,736
Members
452,741
Latest member
Muhammad Nasir Mahmood

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top