Forum Discussion
DAX Conditional Number formatting
- Anonymous9 years ago
My understanding is that if you want conditional formatting, you are stuck with Strings. If you need to make numeric operations, keep the source information different to the display information. I.e. you have a Calc measure that does all of the work, and can be use by other measures further down your chain. Then have a Display measure that is simply the conditional format of your Calc.
Hi Anonymous,
I have tried to do that, but when that is in a chart visual the chart does not know how to display it as it changes the data type into string.
I also tried to wrap the Format in VALUE but Value was not able to convert the String into a number.
Any ideas?
My understanding is that if you want conditional formatting, you are stuck with Strings. If you need to make numeric operations, keep the source information different to the display information. I.e. you have a Calc measure that does all of the work, and can be use by other measures further down your chain. Then have a Display measure that is simply the conditional format of your Calc.
- MarkCBB9 years agoHelper V
Hi Anonymous,
Fair enough I had a feeling it was not going to be possible, I think the best thing I can do in this scenario is to create a "Banner" (Text Card), that says "You are viewing Units" and use SWITCH to change to "You are viewing Value" - This I can do.
Regards,
Mark Blackburn