Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
Item | Sale |
AAA | 1000 |
BBB | 3000 |
CCC | 1500 |
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.
Solved! Go to Solution.
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
Hi @martinnilsson - You can achieve this using a DAX measure that dynamically switches between the SaleAUD and SaleNZD measures based on the slicer selection.
when you selected aud,
Please find the attached pbix file.
Proud to be a 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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
75 | |
68 | |
41 | |
35 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |