Forum Discussion
Anonymous
3 years agoNot applicable
Bug in April 2023 update
Hi All, I have tried the new Dynamic format strings for measures but due to some incorrect formats i have rolled it back to the original format. the issue is that the measure displayed now not as be...
OwenAuger
Super User
3 years agoIn general, the format string expression should be designed to return the intended format string, rather than a formatted value.
Since your current expression returns a formatted value (using the FORMAT function), the resulting string is itself is being interpreted as a format string.
Taking the example where % Rating = 0.6:
- The format string expression returns "60%"
- This is itself interpreted as a format string. Since "6" has no special meaning in format strings, it is treated as a literal character, and the following "0%" is replaced by the formatted value "60%".
- Putting these together, the result is the unwanted "660%"
I suggest using an expression like this instead (I have edited the code slightly to use SWITCH instead of nested IF, and I might have the wrong circle characters):
VAR Wt = [% Rating]
VAR T1 =
SUM ( Sheet1[%Chg] )
VAR Result =
"0%"
& SWITCH (
TRUE (),
T1 > 1.645, " 🟢",
T1 < -1.645, " 🔴"
)
RETURN
Result
Regards
Mahesha_Krishna
3 years agoNew Member
Hi OwenAuger Excellent! and Thank you so much. It's worked as expected.