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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jimmymitra
Advocate I
Advocate I

Dynamically change slicer value based on selection in another slicer

Hi All,

We have two slicers in the report as “Countries” and “CurrencyCode” by which we filter the sales data.

Requirement is after selecting multiple countries ( from "Countries" slicer), if the total number of distinct currency codes is greater than 2(e.g. EUR, INR and DKK), then we should show a default value in the “CurrencyCode” slicer (say “EUR”) else it will show two or less number of currency codes in the “CurrencyCode” slicer.

 

Could you please help me with the DAX or any setting in the power BI report to achieve this?

 

Thanks for your help in advance.

2 REPLIES 2
quentin_vigne
Solution Sage
Solution Sage

Hi @jimmymitra

 

You can add interaction between two slicers.

If it's not working at the moment, you can enable filter in both directions when editing relations between table, it should work !

Down below you can see it in French but it will look exactly the same in english it is where it's writed "A double sens"

 

Hope this will help

relation.PNG

Hi @quentin_vigne,

 

Thank you for your kind reply. But my situation is a bit different. Sorry for not making it clear in the first time.

The second slicer "CurrenyCode" is currently getting filtered by the first slicer("Countries") selection. But I want to tweak the value shown in the "CurrencyCode" slicer i.e. if the number of distinct count of currency code ( after selection of "Countries" slicer) is greater than 2 then we need to show a default value ( say "EUR") in the CurrencyCode slicer instead of all the values . In case the currencycode count is eqaul or less than 2 then this values remain the same.

 

Thanks.

 

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.