cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
analytics-ecoma
Frequent Visitor

Dynamic currency exchange

Hello all, 
I am trying to show sales into USD and Pounds. 
basically I have Currency exchange table which have from_currency (Euro as base currency) and To_currency (Other currencies) and value. 

I have used this formula below and is throwing error, 

New Sales conversion =
IF(SELECTEDVALUE(curency_exchange[to_currency_code]) = "USD", FORMAT([Total Sales]* VALUES(curency_exchange[value], "$0,00",
IF(SELECTEDVALUE(curency_exchange[to_currency_code]) = "GBP", FORMAT([Total Sales]* VALUES(curency_exchange[value]), "$£0,00"))

Kindly help me out !

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @analytics-ecoma ,

 

Please try:

New Sales conversion =
IF(SELECTEDVALUE(curency_exchange[to_currency_code]) = "USD", FORMAT([Total Sales]* SELECTEDVALUE(curency_exchange[value]), "$0,00",
IF(SELECTEDVALUE(curency_exchange[to_currency_code]) = "GBP", FORMAT([Total Sales]* SELECTEDVALUE(curency_exchange[value]), "$£0,00"))

Best Regards,

Jianbo Li

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
v-jianboli-msft
Community Support
Community Support

Hi @analytics-ecoma ,

 

Please try:

New Sales conversion =
IF(SELECTEDVALUE(curency_exchange[to_currency_code]) = "USD", FORMAT([Total Sales]* SELECTEDVALUE(curency_exchange[value]), "$0,00",
IF(SELECTEDVALUE(curency_exchange[to_currency_code]) = "GBP", FORMAT([Total Sales]* SELECTEDVALUE(curency_exchange[value]), "$£0,00"))

Best Regards,

Jianbo Li

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

This is awesome, thanks Li 🙂 

analytics-ecoma
Frequent Visitor

Hello, 
It is throwing an error. Is there any way to specifically pick the value of selected currency ?


 Updating Mediaanalyticsecoma_0-1675502135670.png

 

amitchandak
Super User
Super User

@analytics-ecoma , try like

 

New Sales conversion =
Switch(true(),
SELECTEDVALUE(curency_exchange[to_currency_code]) = "USD", FORMAT([Total Sales]* VALUES(curency_exchange[value]), "$0,00"),
SELECTEDVALUE(curency_exchange[to_currency_code]) = "GBP", FORMAT([Total Sales]* VALUES(curency_exchange[value]), "$£0,00") )

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors