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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
hctrgrc
Frequent Visitor

Using a slicer to show a specific column in matrix visual

Hello, I'm new to Power BI and I've recently come across a scenario where I have two sales columns, each one is a different currency. I would like to have a matrix visual and a slicer on top where you can choose which currency to show. This would show in the matrix the correct income column. 

I have [Ventas_MXP] and [Ventas_USD]. These are my sales columns for USD and MXP (Mexican peso). 

 

hctrgrc_0-1714519652883.png

I would like to select USD in the Currency slicer and filter from the matrix that sales column. 

 

I was thinking of creating a new column and maybe using the Dax function "SELECTEDVALUE"? I'm not sure if this is the best way to do so. 

 

Appreciate the help!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @hctrgrc ,

You have the right idea!

The Table data is shown below:

vzhouwenmsft_0-1714530177226.png

Please follow these steps:

1. Use the following DAX expression to create a measure

Sales = 
 VAR _a = SELECTEDVALUE('Table 2'[Currency])
 VAR _b = IF(_a = "USD",SUM('Table'[Sales for USD]),SUM('Table'[Sales for MXP]))
 RETURN _b

2.Final output

vzhouwenmsft_1-1714530294446.png

vzhouwenmsft_2-1714530312242.png

vzhouwenmsft_3-1714530326456.png


Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
hctrgrc
Frequent Visitor

Thank you very much! It worked just as you showed!

Anonymous
Not applicable

Hi @hctrgrc ,

You have the right idea!

The Table data is shown below:

vzhouwenmsft_0-1714530177226.png

Please follow these steps:

1. Use the following DAX expression to create a measure

Sales = 
 VAR _a = SELECTEDVALUE('Table 2'[Currency])
 VAR _b = IF(_a = "USD",SUM('Table'[Sales for USD]),SUM('Table'[Sales for MXP]))
 RETURN _b

2.Final output

vzhouwenmsft_1-1714530294446.png

vzhouwenmsft_2-1714530312242.png

vzhouwenmsft_3-1714530326456.png


Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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