The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi, I am new to PowerBI when it gets to multiple currency dataset
I have a source Sales Transaction table which has a unit_price column, and a currency column shows which currency is the unit_price value in the record.
The requirement is to have a Currency Slicer on the Report page in PBI. Once the Currency is selected, then the unit_price values will be viewed in the selected currency.
In my SSIS package, I populate the currency_rate table which covers all the major currencies (AUD,USD,EUR,etc..) for each day and versus the each of those Currencies on a daily bases from our ERP system. The Schema of this table is :
Transaction_Currency, RateDate, Currency, Rate
Example for its records:
Record_1 : AUD,2019-12-16 00:00:00.000,AUD,1.000
Record_2 : AUD,2019-12-16 00:00:00.000,USD,0.692
Record_3 : AUD,2019-12-16 00:00:00.000,EUR,0.620
Record_4 : AUD,2019-12-16 00:00:00.000,GBP,0.514
Record_5 : AUD,2019-12-16 00:00:00.000,NZD,1.047200
Record_6 : SGD,2019-12-16 00:00:00.000,AUD,1.068
Record_7 : SGD,2019-12-16 00:00:00.000,USD,0.739
Record_8 : SGD,2019-12-16 00:00:00.000,EUR,0.662
Record_9 : SGD,2019-12-16 00:00:00.000,GBP,0.549717
Record_10: SGD,2019-12-16 00:00:00.000,NZD,1.118
Record_11: SGD,2019-12-16 00:00:00.000,SGD,1.000
____________________________________________________________
The Schema for the Sales_Transaction Table is:
Invoice_ID,Invoice_Date,Invoice_Line_Product_S_Key,Currency,Unit_price
Example for its records:
Record_1 : 10465,2019-12-16 00:00:00.000,1,120,AUD,10
Record_2 : 10465,2019-12-16 00:00:00.000,2,125,AUD,30
Record_3 : 10466,2019-12-16 00:00:00.000,1,131,SGD,25
Record_2 : 10466,2019-12-16 00:00:00.000,2,135,SGD,15
Both source tables are imported into my PowerBI model as a dataset
And as an example the user selects EUR as a currency from the Currency Slicer, he wants the reports list and charts to show the sales in regardles what the transaction currency is, so that he can get the Total sales correct in the currency he selects.
I saw the Video to handle multiple currencies, but in that video the transaction currency is one type not multiple ones like in my case. https://www.youtube.com/watch?v=88QSf2fB1Rg
Whoever knows the best way to handle my case , I appreciate if you can share the solution
Thanks
Adam
@ahamawandi Please try below measure to get the unit price in selected currency
Measure =
VAR _selectedCurrency = SELECTEDVALUE(currency_rate[Currency])
VAR _currentCurrency = MAX(Sales_Transaction[Currency])
VAR _rate = CALCULATE(MAX(currency_rate[Rate]),FILTER(ALL(currency_rate),currency_rate[Currency]=_selectedCurrency&¤cy_rate[Transaction_currency] = _currentCurrency))
RETURN SUMX(Sales_Transaction,_rate*Sales_Transaction[Unit_price])
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
18 | |
16 | |
13 |
User | Count |
---|---|
39 | |
38 | |
23 | |
21 | |
20 |