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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
EvH
Frequent Visitor

Slicer Selection based on another Slicer Selection

I have a requirement to filter a slicer using another slicer. I have two slicers, Company Code and Currency Selection as shown below.  The requirement is when I select one company the Currency Selection should display the three currency options, however, when I select more than one company, Local Curr should disappear. If possible, Local Curr should appear at the top when only one company is selected. I tried several DAX options and cannot solve this, your assistance will be greatly appreciated.

EvH_0-1673947831060.png

 

1 ACCEPTED SOLUTION
EvH
Frequent Visitor

Thank you very much I will give it a go and let you know.

View solution in original post

4 REPLIES 4
Thomas_Daubert
Frequent Visitor

I would do it like that : 

 

nb_selected =
IF( Sheet1[Currency] = "Local Curr"
    , IF(ISFILTERED(Sheet1[CoCd]), COUNTROWS(VALUES(Sheet1[CoCd])),1)
    , 1
)
 
The goal is to filter the slicer with nb_selected = 1 only for currency Local.
 

Thanks Thomas

EvH
Frequent Visitor

Thank you very much I will give it a go and let you know.

amitchandak
Super User
Super User

@EvH , for that you can remove all values from the slicer

 

create a measure like

 

if( calculate(distinctcount(Table[Company]), allselected()) >2, 0, 1)

 

Use a visual level filter and check for value =1

 

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors