4 Replies Latest reply: May 23, 2017 3:38 AM by Avinash S

# case Statement

Hi Guys,

I have certain data that has to be loaded in qlicksense.

I have three cuntries namely USA,India and Japan.

Each country has total spend column in which respective spend is present in there currency.

If the location is USA then the total spend column have 61.23. Which is in Dollar.

I have to convert the currency into Indian rupee.

So wherever location is other than india i need to multiply the total spend with Indian conversion.

Let say USA spend is 61.23

But my new column should have total_spend in Rupee that is 61.23*64.

How should i use case statement over here.

Kindly help.

Regards,

Avinash

• ###### Re: case Statement

Hi Avinash,

The dollar-Indian rupee rate may vary. Therefore, I would load the data as is, and already in the expressions of charts did all the calculations.

The expression for [total_spend ] itself, as already written above Rohit will look something like this

If(Contry='India ', [spend], [spend}*\$(var_rate)),

where \$(var_rate) - variable of rate dollar-Indian rupee.

Regards,

Andrey

• ###### Re: case Statement

Thanks Andrey,

Yes I should explain in detail as you did. Never mind!

Best,

Rohit Kumar

• ###### Re: case Statement

Thanks Andrey. It worked.