Text String Formatting - doesn't work if formula is used
I have an issue trying to format a value to show decimal places when the formula is used in the text expression
My expression is: value1/427154 (value1 changes dynamically but it's always smaller that the denominator with is static value). This is my formatting {0:0.00%}, I also tried number formatting {0:#.00}
The results always give me X.00 (two zeros ) for decimal places, and not actual digits. It looks like it rounds up the result to the whole number.
What am I doing wrong?
Appreciate all and any help.
Nataliya
-
Hi Nataliya,
Your format string {0:0.00%} is correct. What is happening is your denominator is being treated as an integer, so the result of the division is also an integer. This will always be 0 in your case.
The solution is to change your denominator to 427154.0 which will allow the math to happen using floating point numbers.
0 -
Hi Ryan,
Thank you very much for a quick respond. That solved my problem.
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
2 commentaires