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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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