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.
Hi,
I have a measure "Sales" - which switches between showing US sales UK or GBP or USD. I'm formatting the measure to include the correct currency as per below screenshot.
When I add this measure to a table and sort it, it doesn't sort per the numeric value and instead sorts as text - (because the measure is being recognised as text from the formatting). Example below.
Any thoughts how I can get around this so when sorting in a table it's sorted numerically whilst keeping the currency marker?
Thanks
Dan
Solved! Go to Solution.
@Danch89 once you use the FORMAT function than you get a text and that's it 🙂
The solution for your use case is to use calculation groups (you need external tool like tabular editor for that).
You will be able to write a dynamic format string, but the value of the measure will remain a currency and you could sort it as you intended.
This is the best source to learn calculation groups (and DAX in general):
https://www.sqlbi.com/calculation-groups/
In case it answered your question please mark this as a solution for community visibility. Appreciate Your Kudos 🙂
@Danch89 once you use the FORMAT function than you get a text and that's it 🙂
The solution for your use case is to use calculation groups (you need external tool like tabular editor for that).
You will be able to write a dynamic format string, but the value of the measure will remain a currency and you could sort it as you intended.
This is the best source to learn calculation groups (and DAX in general):
https://www.sqlbi.com/calculation-groups/
In case it answered your question please mark this as a solution for community visibility. Appreciate Your 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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |