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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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