2 Replies Latest reply on Sep 19, 2018 11:23 AM by Mahfooj Khan

# Percent column question.

So currently I've made a percent difference column that returns N.A if specific values are zero or null, and the percent difference if not. The only thing I cant figure out is how to change the format of the decimal places. I know I could change it through the format tab but the problem is that I had to make it a string in order to get the return of N.A. in some columns.

Here is the code I'm using:

IF SUM() = 0 or SUM() = 0 then "N.A"

ELSE

STR(((SUM()-SUM())/SUM())*100) + "%" END

Here is an example of how the column looks with the above code. I've tried to fit the round function in the Else condition but can't figure out how exactly to make it work.

I've also had a float version of the code that allowed me to change the decimal places but I couldn't add the "%" at the end of it.

FLOAT(if SUM() = 0 or SUM() = 0 then "N.A"

ELSE

STR(((SUM()-SUM())/SUM())*100) END)

I would really like all 3 to work, the N.A., the % and the decimal places.

If anyone has ideas then let me know!

• ###### 1. Re: Percent column question.

Use This

STR(ROUND(SUM([Value),2))+"%"

1 of 1 people found this helpful
• ###### 2. Re: Percent column question.

Is that possible to get some sample mock up data?

Meanwhile, you can follow this blog

Mahfooj