Forum Discussion
mrbartuss
Advocate II
1 year agoDynamic formatting isn't working as expected for data label details
I need to change the number format to show 'MM' for millions and 'M' for thousands (instead of the default 'M' and 'K'). To achieve this, I'm using the following dynamic format: VAR CurrentValue = ...
speedramps
Super User
1 year ago
Answer =
VAR CurrentValue = SUM(yourdata[Sales])
VAR formatstring =
SWITCH(
TRUE(),
CurrentValue <= 1E3, "#,0.0",
CurrentValue <= 1E6, "#,0,.0M",
CurrentValue <= 1E9, "#,0,,.0MM"
)
RETURN
FORMAT(CurrentValue,formatstring)
Please click thumbs up just for the helpful suggestion. 👍
Then click [accept solution] it is works.
Thank you 😀
mrbartuss
Advocate II
1 year agoThank you for that. However in a simple table even my dynamic format solution works. The problem is that id does not, for example, for data label details.
So you're suggesting I should duplicate all measures with FORMAT function?