Hi everyone!
I have an issue related to the Dynamic Format String. I think the format is correct because it works with the card visual in other cases, but in that case, I can’t figure out where the problem lies.
Here is my PBIX file
Decimal place issue.pbix (6.4 MB)
Many thanks
Daniel
I don’t think you are using Dynamic Format String. You are trying to format the output as string directly in Measures rather than in Format String Definition.
TMDL Script:
formatStringDefinition =
VAR CurrentValue = SELECTEDMEASURE()
RETURN SWITCH (
TRUE (),
CurrentValue < -1E6, "#,0,,.0 M",
CurrentValue < -1E3, "#,0,.0 K",
CurrentValue < 1E3, "#,0",
CurrentValue < 1E6, "#,0,.0 K",
CurrentValue < 1E9, "#,0,,.0 M",
CurrentValue < 1E12, "#,0,,.0 B",
"#,0,,,.0 T"
)
3 Likes
Many thanks, Pranamg! It works great now.
Daniel