4 Replies Latest reply: Jun 14, 2017 2:33 AM by pankaj thakur

# How to use "if" and compare it with the calculated data in a different column

I have the below data

AVice President1000011000(if variance% between money1 & 2 is <20%, then show the value)
BDelivery Head1500013000(if variance% between money1 & 2 is <20%, then show the value)
COperations Manager1800019000(if variance% between money1 & 2 is <20%, then show the value)

The column Money1 will not change, the column money 2 will be picked up from the raw data and compared against the column "Grade".

I want to calculate if variance% between money1 & 2 is <20% for each of the grade and then the category should the value %)

• ###### Re: How to use "if" and compare it with the calculated data in a different column

We've got like below

In your example, I don't think which value we need to pick condition is fulfillment. Would you explain little more

• ###### Re: How to use "if" and compare it with the calculated data in a different column

Hi Anil, in the dataset, I have a column which has the actual package offered, i want to compare it to the column 'Money1' and see the variance. If the variance is >20%, the category should show as '>20%' else it should show '<20%'

• ###### Re: How to use "if" and compare it with the calculated data in a different column

You can do like below

I assume, you may have Variance column with you for Column(3)

The condition should be like below

Sum(Aggr(If(Column(1) = Column(3) or Column(3) >= '0.2', '>=20%', '<20%'), Grade, Name))

• ###### Re: How to use "if" and compare it with the calculated data in a different column

Hi Swamy,

Do the above calculation in load script itself:

Name,

Money1,

Money2,

If(((Money2-Money1)/Money2)*100 < 20,((Money2-Money1)/Money2)*100 ) as Percentage

FROM

[C:\Users\PTH\Desktop\Accum.xlsx]

(ooxml, embedded labels, table is Sheet1);

Regards,

Pankaj