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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jteague
Frequent Visitor

Slicer Value change for only one button

I have a slicer in my dashoboard 'Session' with different lengths of time:

 

Session

15-week
10-week, early
10-week, late
7-week, early
7-week, late
5-week, early
5-week, late
Dynamic w/o DE

 

For the top 7 buttons I just need them slicer to act normal and disagrregate the data based on the values within the session column.

For the last button 'Dynamic w/o DE' in need the slicer to only display the values if a different column 'DE' = 'No'. Thanks in adavance.

4 REPLIES 4
Bibiano_Geraldo
Super User
Super User

Hi @jteague ,
Create a Measure to Check for 'Dynamic w/o DE':

Session_Filter =
IF(
    SELECTEDVALUE('Session'[Session]) = "Dynamic w/o DE", 
    IF(
        SELECTEDVALUE('DE'[DE]) = "No", 
        1, 
        0
    ), 
    1
)

This measure checks whether the Session is "Dynamic w/o DE" and whether DE equals "No". If both conditions are met, the result is 1 (indicating that the data should be displayed). If not, the result is 0 (meaning the data should not be shown).

For each visual where you want this logic to apply, drag the Session_Filter measure to the Visual Level Filters and set it to 1.

dashboard Screenshot 2024-12-19 144718.png

 

Thanks for the quick reply. I think I followed your directions correctly but it removed "Dynamic w/o DE" from the slicer completely. Thanks.

Anonymous
Not applicable

Hi @jteague 

 

Thanks for the reply from Bibiano_Geraldo .

 

I created a sample data to test it for your reference:

vxuxinyimsft_0-1734687176816.png

 

1. Create a calculated table as follows

Slicer = VALUES('Table'[Session])

 

2. Create a calculated column as follows

IsDyn = IF([Session] = "Dynamic w/o DE" && [DE] = [No], 1, 0)

 

3. Create a measure as follows

SelectedValue = 
IF (
    SELECTEDVALUE ( Slicer[Session] ) = BLANK (),
    1,
    IF (
        SELECTEDVALUE ( 'Slicer'[Session] ) = "Dynamic w/o DE",
        IF ( MAX ( 'Table'[IsDyn] ) = 1, 1 ),
        IF ( MAX ( 'Table'[Session] ) = SELECTEDVALUE ( 'Slicer'[Session] ), 1 )
    )
)

 

4. Put the measure into the visual-level filters, set up show items when the value is 1.

vxuxinyimsft_1-1734687340531.png

 

Output:

vxuxinyimsft_3-1734687647877.png

 

vxuxinyimsft_4-1734687661923.png

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for your reply but I am still missing something. So I will add some more visuals and see if I can be more descriptive. I changed 'DE' to just be '0' if I dont want the data in the slicer and 1 if I do. Here is a snippet of my dataset:

 

data.png

What I want is this:

 

want.png

I'd rather the box not have 'DE' and '1' in it but the graph is performing correctly like this. But as soon as I turn it into a slicer it no longer works:

 

have.png

the settings are the same but it's not filtering it once I turn it into a Slicer.

 

Thanks for all your help.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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