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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
jcolby
Helper I
Helper I

Button/Slicer for using different filter on a stacked bar chart

Greetings,

 

Been stuck for a while on this, poured over the forum/google and still unsure.

 

I have a stacked barchart consisting of a measure(effective rate) and a column(hours) with a Company axis:
pbi example.png

 

I want to add some type of button/slicer, could be a 2 option radio selection, or even just an on/off checkbox.

The button should just apply a different filter.
I only need 2 views:

When measure < 100

When measure >= 100

 

I've simplified the problem in an example pbix file:
https://www.dropbox.com/s/ppxt72cu29d2e6b/splitting%20effective%20rate%20example.pbix?dl=0

Greatly appreciate anyone able to have a look

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @jcolby ,

 

Actually, you can achieve this using the filter pane:

Capture.PNG

If you'd like to use the slicer, please refer to the pbix here: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EYRoWI7UudhDvZwcfsf7D9...

(Note the measure is not blank)

04.PNG

Best regards,

Dina Ye

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

4 REPLIES 4
v-diye-msft
Community Support
Community Support

Hi @jcolby ,

 

Actually, you can achieve this using the filter pane:

Capture.PNG

If you'd like to use the slicer, please refer to the pbix here: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EYRoWI7UudhDvZwcfsf7D9...

(Note the measure is not blank)

04.PNG

Best regards,

Dina Ye

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Hi @v-diye-msft 

Excellent, thank you - the slicer your created is exactly what I need.

 

I'm missing something though.

The new table, with the desired filter selections - is there something special about creating/configuring that?
Theres no relationships and its just text?
When I add additional options or change the numbers in edit source it doesnt filter anything and breaks what you've setup, even if i just flip an operator, "<" to ">".  Or even if I change 100 to 99.

 

 

Trying to reverse engineer it, can you see what I'm missing?

- Enter Data

- Type out the desired filter options you want in a single column: "Measure < 100" "Measure >= 100"

- New Slicer visual with the filter column

- Visual filter on bar chart - Measure not blank

@v-diye-msft 

 

ahhhhh, wasnt paying attention - didnt see the measure (i thought it was my measure lol)

 

Thank you!

 

 

@v-diye-msft 

Tweaked your solution a bit and used a SWITCH statement

Effective Rate (Filtered) = 
SWITCH(
    SELECTEDVALUE('Filters'[ Effective Rate]),
    "< 100", CALCULATE(
        [Effective Rate #],
        FILTER(Companies,[Effective Rate #] < 100)
    ),
    ">= 100", CALCULATE(
        [Effective Rate #],
        FILTER(Companies,[Effective Rate #] >= 100)
    ),
    [Effective Rate #]
)

 

Thanks again, pushed my understanding wrestling with this problem

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors