Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a data in which sales data have a value column, also have a base currency value column in which it mentions which currency it is (AUD,GBP,USD). Want to make one column where it converted AUD & GBP to USD.
One more dataset is given - exchange rate where every required date have currency exchange from AUD,GBP to USD.
Can anyone help me to convert column into USD. I am facing problem in writing DAX column query. I am new to Power BI.
Excel and .pbix file : All Required File found here
Sales Data
Currency Exchange Data
Solved! Go to Solution.
Try below DAX in a calculated column.
Currency Conversion to USD =
VAR __baseCurrency = 'Sales Data'[BaseCurrency]
VAR __audTousdRate =
LOOKUPVALUE (
'Exchange Rates'[Rate to AUD/USD],
'Exchange Rates'[Date (GMT)], 'Sales Data'[Date]
)
VAR __gbpTousdRate =
LOOKUPVALUE (
'Exchange Rates'[Rate to GBP/USD],
'Exchange Rates'[Date (GMT)], 'Sales Data'[Date]
)
VAR __result =
SWITCH (
__baseCurrency,
"GBP", 'Sales Data'[Value] * __gbpTousdRate,
"AUD", 'Sales Data'[Value] * __audTousdRate,
'Sales Data'[Value]
)
RETURN
__result
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
@shantanu97 , refer if these can help
currency
https://www.youtube.com/watch?v=4dosxfNxR6M
https://www.sqlbi.com/articles/currency-conversion-in-power-bi-reports/
https://radacad.com/currency-converter-power-bi-function-part-1
https://www.youtube.com/watch?v=Q4hF4CwJsFEhttps://radacad.com/currency-exchange-rate-conversion-in-...
https://businessintelligist.com/2015/03/17/power-bi-tutorial-how-to-implement-currency-conversion-us...
https://blog.beyondimpactllc.com/blog/building-a-dynamic-currency-converter-with-power-bi
Try below DAX in a calculated column.
Currency Conversion to USD =
VAR __baseCurrency = 'Sales Data'[BaseCurrency]
VAR __audTousdRate =
LOOKUPVALUE (
'Exchange Rates'[Rate to AUD/USD],
'Exchange Rates'[Date (GMT)], 'Sales Data'[Date]
)
VAR __gbpTousdRate =
LOOKUPVALUE (
'Exchange Rates'[Rate to GBP/USD],
'Exchange Rates'[Date (GMT)], 'Sales Data'[Date]
)
VAR __result =
SWITCH (
__baseCurrency,
"GBP", 'Sales Data'[Value] * __gbpTousdRate,
"AUD", 'Sales Data'[Value] * __audTousdRate,
'Sales Data'[Value]
)
RETURN
__result
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |