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
Anonymous
Not applicable

Return value based on selected country and its corresponding currency

Hi All, 

 

I need the formula that would return sales in local currency based on the country slicer. For e.g, if i select sweden in the slicer, it should return me sales in swedish kroner only. I have attached the data set for further clarification. 

 

Thanks so much for your help in advance!!!! 

 


datadata

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi ekx,

It seems that you want to achieve below result, when you select country SWEDEN, it will show sek currency and sale in table, right? If so, you could create another table (cur)like below, and create relationship between tables , use new table(cur)'s country in Slicer, you will get below result

306.PNG307.PNG

Best Regards,
Zoe Zhi

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

4 REPLIES 4
dax
Community Support
Community Support

Hi ekx,

It seems that you want to achieve below result, when you select country SWEDEN, it will show sek currency and sale in table, right? If so, you could create another table (cur)like below, and create relationship between tables , use new table(cur)'s country in Slicer, you will get below result

306.PNG307.PNG

Best Regards,
Zoe Zhi

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

 

Anonymous
Not applicable

wow thanks for you help!!!

 

Im just curious , is it possible to do it with a formula?

dax
Community Support
Community Support

Hi ekx,

You could use measure to achieve this. You still need to create a table just have country column(like above suggestions, but this table only have country column), and don't need to create  relationship between two table, then you could create a measure like below, use new table's country in slicer

Measure 9 = SWITCH(SELECTEDVALUE('cur'[Country]), "A",CALCULATE(SUM('currency'[amount]), FILTER(('currency'),('currency'[currency])="a")),"B",CALCULATE(SUM('currency'[amount]), FILTER('currency',('currency'[currency])="b")),"C",CALCULATE(SUM('currency'[amount]), FILTER('currency',('currency'[currency])="c")))

308.PNG

Best Regards,
Zoe Zhi

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

Anonymous
Not applicable

AMAZING!! thanks so much for your help!!!

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.