Forum Discussion
RobRayborn
10 months agoHelper IV
Format string showing negative sign (-), sometimes.
I'm using calculation groups and one is to show the growth % form previous year. I'm using the following Fromat String to format this calculation group: VAR Output =IF( SELECTEDMEASURE() >= 0, FORMA...
- 10 months ago
Hi RobRayborn
First off, to fix the issue I would suggest this format string which should give you the intended format:
"0%;" & UNICHAR ( 128315 ) & "(0%);0%"To explain the issue:
- In general, a format string expression should return the format string itself, not the formatted measure value as text. (In some cases it can be useful to do this but is not needed here).
- If you did want to return a literal formatted value, you would need to return """" & Output """"
- SELECTEDMEASURE () is a reference to the underlying measure used in the visual, which is not the Growth % returned by this calculation item's expression but is rather the original measure for which you are calculating Growth %. So the logic is not correct for testing the sign of the Growth % value.
- 10 months ago
Thank you. That worked perfectly.
RobRayborn
10 months agoHelper IV
Thank you. That worked perfectly.