Forum Discussion
Data Labels and Y Axis - Dynamic Format String
Hi powerbiexpert22,
I would keep the measure numeric and use a Dynamic format string instead of using FORMAT() in the measure.
For example, if the measure is:
Total Amount = SUM ( Sales[Amount] )
Select the measure, go to Measure tools > Format > Dynamic, and use something like:
VAR _Value = ABS ( [Total Amount] ) RETURN SWITCH ( TRUE (), _Value >= 1000000, "#,0.0,,M", _Value >= 1000, "#,0.0,K", "#,0" )
The important part is the visual formatting.
Set: Y-axis > Display units = None and: Data labels > Display units = None
If Display units is left as Auto/Thousands/Millions, the visual can override the dynamic format string, which is normally why the data labels and Y-axis don't appear consistently.
Best Regards,
Maruthi
LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/
X - Maruthi Siva Prasad - (@MaruthiSP) / X