Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
marenecaCZ
Frequent Visitor

Filter column chart by more slicers

Hello,

could you please help me with one column chart in Power BI Desktop?:

I have a simple data table:

marenecaCZ_0-1677157394905.png

Now I create a column chart (share of "count"):

marenecaCZ_1-1677157449109.png

 

Now I created one slicer using column "Y/N" from my data table and also another 3 slicers from my data table (slicer 1, slicer 2, slicer 3). So I have 4 slicers. 

What I would like to do is, when I select "no" from slicer "Y/N", I will see the column chart without the brand Bosch. But the values must be unchanged. It shoul look like this:

marenecaCZ_2-1677158010931.png

I use this measure:

DIVIDE ( SUM ( Table1[count] ), CALCULATE ( SUM ( Table1[count] ), ALL ( Table1 ) ) )

 

It works (it gives me the correct results) well in the case that I donť use other slicers (slicer 1, slicer 2 and slicer 3). But I need to use them. When I start to use other slicers, the chart shows not correct results.

 

How should I change the measure? Or any other solution? 

Thank you for your help

 

6 REPLIES 6
HotChilli
Super User
Super User

That looks right for the denominator.  You'll still need the divide(sum('QTY detail'[Count]) part

No, this doesn't work.

I use this measure: 

share % = divide(sum('QTY detail'[Count]), CALCULATE(sum('QTY detail'[Count]), all('QTY detail'[Brand]))).
It seems that the measure is exactly as you propose.
And how to continue now? How to create a slicer that hide the RoB from the bar chart without changing the results?
I tryied to create a slicer from column "RoB yes / no" from my data table.
marenecaCZ_0-1677177346936.png

When I select "no" in this slicer (no = all brands without Bosch) I get this bar chart:

marenecaCZ_1-1677177440730.png

I don't see RoB bar (that's super) but the Bosch share is not correct. I still should see 8,7%. As I can see without using this slicer.

 
HotChilli
Super User
Super User

Good explanation.

I think you want to remove all the filters on the denominator of the measure share %.

Can you test that at your side? Just create a copy of the measure and edit the 

CALCULATE(sum('QTY detail'[Count]), all('QTY detail'[Brand])  to remove filters

I donť fully understand, what should I do. When I create this new mesure:

Measure = calculate(sum('QTY detail'[Count]), ALL('QTY detail'))
it doesnť work. I don't get the share of brands.
marenecaCZ
Frequent Visitor

I canť upload the PBIX file, so I will try to exlain it in more detail.

This is my Data table:

marenecaCZ_0-1677163630580.png

Last column "RoB yes / no" is calculated: RoB yes / no = if('QTY detail'[Brand] = "RoB", "yes", "no")

I created one measure:

share % = divide(sum('QTY detail'[Count]), CALCULATE(sum('QTY detail'[Count]), all('QTY detail'[Brand])), 0)
And use this measure to create one card and one bar chart:
marenecaCZ_1-1677163793142.png

 As you can see the Bosch share is 8,7% in all these visuals.

 

I also created several Slicers (column from data table = slicer):

marenecaCZ_2-1677163979882.png

My goal is just to hide the results (the bar) "RoB" in the bar chart. I want to create a new slicer (or maybe use of my existing slicers, I don' know) to hide the bar "RoB" in the bar chart.

marenecaCZ_3-1677164969270.png

 

This new slicers should contain:

"Yes, I want to display RoB in chart" and "No, I don't want to display RoB in chart".

 

But using this new slicer, the results in the charts must not be recalculated.

So if the Bosch share is 8,7%, without RoB bar the Bosch share must be also 8,7%.

When I use another slicer "MDA/SDA" and select "MDA" from this slicer, the Bosch share is 5,9%. When I use the new slicer to hide the RoB bar, the Bosch share must be still 5,9%.

 

Is it clear now?

 

Thank you very much

 

 

 

 

HotChilli
Super User
Super User

"When I start to use other slicers, the chart shows not correct results" - this is the main problem, isn't it?

Can you explain what's happening and also please link the pbix so we can have a look?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors