Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I have a data table showing prices of different items in the local currency of each country, the date, the country, and the exchange rate of the local currency to US dollars, amount sold.
What I need is to have a report in which selecting, local currency or US dollars; The report presents me with the data in dollars or in the local currency.
The most obvious and easy thing is to have a column with the price in dollars (additional to the one in local currency), but that would lead me to have reports in both dollars and local currency; And that's tedious.
I hope you can help me.
Solved! Go to Solution.
Hi @Syndicate_Admin ,
You can try this method:
Sample data:
Then you need to new a table to be a slicer:
Then in the DataTable, new a measure:
USDORLOCAL =
var _USD = SUMX(SUMMARIZE('DataTable', 'DataTable'[Country],'DataTable'[Exchange Rate],'DataTable'[Price],'DataTable'[Items], "USD", 'DataTable'[Exchange Rate] * 'DataTable'[Price]),[USD])
var _Local = SUMX(SUMMARIZE('DataTable','DataTable'[Country],'DataTable'[Items],'DataTable'[Price]), 'DataTable'[Price])
return
IF(SELECTEDVALUE(SlicerTable[Slicer]) = "USD", _USD, _Local)
The result is:
Is this what you expect?
Hope this helps you.
Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Syndicate_Admin ,
You can try this method:
Sample data:
Then you need to new a table to be a slicer:
Then in the DataTable, new a measure:
USDORLOCAL =
var _USD = SUMX(SUMMARIZE('DataTable', 'DataTable'[Country],'DataTable'[Exchange Rate],'DataTable'[Price],'DataTable'[Items], "USD", 'DataTable'[Exchange Rate] * 'DataTable'[Price]),[USD])
var _Local = SUMX(SUMMARIZE('DataTable','DataTable'[Country],'DataTable'[Items],'DataTable'[Price]), 'DataTable'[Price])
return
IF(SELECTEDVALUE(SlicerTable[Slicer]) = "USD", _USD, _Local)
The result is:
Is this what you expect?
Hope this helps you.
Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 68 | |
| 32 | |
| 27 | |
| 25 |