Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Mahamed_Qlik
Specialist
Specialist

Auto Currency convert

Hi,

I have below scenario

Suppose I have below table:Date

IDAmountCurrencyDate
160USD01-02-2016
2300IND02-02-2016
3100GBP03-02-2016
4200USD04-02-2016

Now I want to show the Amount with respective to the ID in chart.

But, i need all the Amount should be in USD only.

If i select ID 2 then it should not show the amount as 250 as this is in IND currency rather is should show

in USD (suppose 1 USD =60 IND) then if I select ID 2 then it should show amount as 5 USD.

same for the others.

So assume,

1 USD =60 IND

1 USD = 100 GBP


Kindly help.


Regards,

Mahamed

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Create a currencies table in the script:

Currencies:

LOAD * INLINE [

Currency, Factor

USD, 1

IND, 60

GBP, 100

];

Then change your expression from sum(Amount) to sum(Amount/Factor)


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
sunny_talwar

Do you have one static rate you want to convert the rate based on or do you have different rates for different periods? For example do you have this?

XR     DATE     CURRENCY

60     01/01/2015     IND

61     01/02/2015     IND

.

.

.

65     01/15/2015     IND

Gysbert_Wassenaar

Create a currencies table in the script:

Currencies:

LOAD * INLINE [

Currency, Factor

USD, 1

IND, 60

GBP, 100

];

Then change your expression from sum(Amount) to sum(Amount/Factor)


talk is cheap, supply exceeds demand
Mahamed_Qlik
Specialist
Specialist
Author

Hi Sunny,

It will be static for some time  later it may changed.

But thnx for the response.

Mahamed_Qlik
Specialist
Specialist
Author

Hi Gysbert,

Thank you for your response.

This the one which i was looking for.

Gysbert_Wassenaar

If you're question is answered then please mark this discussion as answered.


talk is cheap, supply exceeds demand
Mahamed_Qlik
Specialist
Specialist
Author

How do I do that?