Forum Discussion
Custom Format String based on measure value
- 4 years ago
It sounds like a Calculation Group to control your number formatting would be useful here.
With a Calculation Group, each Calculation Item has a format string specified by a DAX expression. This format string can be either a constant, or some expression that depends on the measure value itself.
In your case, you may want to consider using the Calculation Group to act as the measure selector, as you could have each Calculation Item specify both the measure and the format string.
Here's a good article on this general topic:
https://exceleratorbi.com.au/dynamic-formatting-of-switch-measures/
Calculation Groups do work with models containing DirectQuery tables, so this approach should work fine in your situation.
Regards,
Owen
I got the same issue like you and seek for a more long-term solution.
The using Calculation Group in Tabular Editor will hugely affect the implicit measures. And it is not stable, sometimes it makes the whole measures disappear without a reason (?!).
Eventually, it's a pity that MS is relying too much on 3rd party application whose free version is unstable at all, especially with huge dataset. This is saying from my own real cases. They should work on these basic features.
😞