2 Replies Latest reply on Apr 21, 2017 1:38 PM by Deepak Rai

# IF Statement to compare percentage values

Hi,

I have below If statement and want to compare with the percentage values,

IF ((ZN(SUM([Reports Change])) - LOOKUP(ZN(SUM([Reports Change])), FIRST())) / ABS(LOOKUP(ZN(SUM([Reports Change])), FIRST()))) > 100/100 THEN '1'

ELSE '2'

END

For the above try, I thought it will make all columns with the value as "1.00%" to 1 but its not working as expected. I have multiple percentage values that needs to be compared and we have even have negative percentage values. Need to do KPI's based on the IF statement result values

Could you please let me know if anything wrong with the above statement?

• ###### 1. Re: IF Statement to compare percentage values

Hey Balaji,

Could you post a packaged workbook that we could use to see what you've been trying?

Thanks,

-Diego

• ###### 2. Re: IF Statement to compare percentage values

HI Balaji,

Just write 1 in place of 100/100.

OTher solution may be

IF [abc]>=0 and [abc]< 1

Then "2"

Else

"1"

end

Thanks

Deepak