I am using the Formula node to divide two fields (say 5/10). The output gives me 0.50 but i am looking for it to show as 50%.
Can anyone help?
Regards,
Rushabh
How many decimal places are you looking for?
ToString([Number],[How many decimal places) + '%'
if number = 12.34567 & how many decimal places = 4
then result = 12.3456%
if how many decimal places is left out of the equation of ToString([Number])+'%'
then result = 12.34567%
Hi @rushabh_shah!
Not to worry, help is here. You'll want to calculate the value and then convert it to a string where you'll add a '%' sign to it.
Given that you define your [Output Field] as a vString....
ToString([Field 1] / [Field 2] * 100,2) + '%'
This formula will turn 5 divided by 10 into 50.00%
The second parameter in the ToString function is the number of decimal places.
Cheers,
Mark
Thanks for the help Mark.
One question, won't we miss the decimals in this case, since we are converting to string?
I tried this method of using toString() but it throws an error.
Formula (7) The formula "curr_qtr_revised_conversion" resulted in a string but the field is numeric. Use ToNumber(...) if this is correct. (Expression #1)