Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

1 Solution

Accepted Solutions
ahaahaaha
Partner - Master
Partner - Master

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

View solution in original post

4 Replies
rohitk1609
Master
Master

ahaahaaha
Partner - Master
Partner - Master

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

rohitk1609
Master
Master

Thanks Andrey,

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

Best,

Rohit Kumar

Anonymous
Not applicable
Author

Thanks Andrey. It worked.