Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
We are facing a challenge applying dynamically the right currency symbol based on the currency field from the table.
Using API, we are preparing the following table with information about purchased products, where the key fields are:
Where row_total is actually the purchased amount per order, it is decimal with enabled summarization.
The goal is to build a summarized report with the top 10 purchased products based on the row_total
Challenges:
currencyFormat = var cur = CALCULATE(MIN(OrderItem[currency])) return switch(cur, "GBP","£#,##0.#", "EUR", "€#,##0.#", "$#,##0.#");
FORMATED_ROW_TOTAL = FORMAT(row_total,currencyFormat )
In our case, the ideal scenario is to modify the row_total field "custom format" settings using DAX but seems it impossible.
Or, using Parameters to define the current currency, which also seems also not possible.
One of the ideas was to prepare a separate measured table with already summarized and grouped data per product.
But it sounds crazy and complex.
Appreciate any reasonable ideas.
Solved! Go to Solution.
You could try using a calculation group (see article below). A calculation group gives you more control over formatting and doesn't convert the data type to text.
https://www.sqlbi.com/articles/controlling-format-strings-in-calculation-groups/
Proud to be a Super User!
You could try using a calculation group (see article below). A calculation group gives you more control over formatting and doesn't convert the data type to text.
https://www.sqlbi.com/articles/controlling-format-strings-in-calculation-groups/
Proud to be a Super User!
This solution works perfectly for my case.
Not the ideal, but completely different level working with Power BI
Some useful link who wants to learn more:
https://learn.microsoft.com/en-us/training/modules/create-calculation-groups/5-lab
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |