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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
martinnilsson
Frequent Visitor

Display Measure based on selection in slicer

I am new to Power BI and need some help with something which seems pretty easy in theory.

I am displaying data in a matrix table which shows items and sales numbers.  I have created separate measures for each currency value and I need to display the currency value based on a selection from a slicer.

 

I created a table which is used for the Currency slicer containing the below values

AUD
NZD

 

Based on the selection in the slicer (AUD or NZD) I want to use the corresponding measure in my matrix view table for the Sale column.

ItemSale
AAA1000
BBB3000
CCC1500

 

In pesudo code I want to acheive this:

IF(selected value in slicer = "AUD") then 

    Use the SaleAUD measure

ELSE IF(selected value in slicer = "NZD") then

    Use the SaleNZD measure

ELSE

   Use the SaleAUD measure

 

How would I acheive this in Power BI

 

-M.

 

 

 

1 ACCEPTED SOLUTION
Akash_Varuna
Super User
Super User

Hi @martinnilsson , Since you have already created Table could you try this 
1 . Create Table
2 . Add that table to slicer
3 . Create a Dyanmic Measure :
SelectedSales =
SWITCH(
TRUE(),
SELECTEDVALUE(Currency[Currency]) = "AUD", [SaleAUD],
SELECTEDVALUE(Currency[Currency]) = "NZD", [SaleNZD],
[SaleAUD]
)
Replace Currency[Currency] with your coulmn
4 . Add this measure to matrix with item column
If this post helped please do give a kudos and accept this as a solution
Thanks In Advance

View solution in original post

2 REPLIES 2
rajendraongole1
Super User
Super User

Hi @martinnilsson  - You can achieve this using a DAX measure that dynamically switches between the SaleAUD and SaleNZD measures based on the slicer selection.

 

rajendraongole1_0-1740121477424.png

 

when you selected aud, 

rajendraongole1_1-1740121507757.png

 

 

Please find the attached pbix file.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Akash_Varuna
Super User
Super User

Hi @martinnilsson , Since you have already created Table could you try this 
1 . Create Table
2 . Add that table to slicer
3 . Create a Dyanmic Measure :
SelectedSales =
SWITCH(
TRUE(),
SELECTEDVALUE(Currency[Currency]) = "AUD", [SaleAUD],
SELECTEDVALUE(Currency[Currency]) = "NZD", [SaleNZD],
[SaleAUD]
)
Replace Currency[Currency] with your coulmn
4 . Add this measure to matrix with item column
If this post helped please do give a kudos and accept this as a solution
Thanks In Advance

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.