This content has been marked as final. Show 2 replies
1 of 1 people found this helpful
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"
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"
I would really like all 3 to work, the N.A., the % and the decimal places.
If anyone has ideas then let me know!