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
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