Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Converting figures from native currencies to EUR

Hi,

I am trying to connect a table with data in country's currencies with a table with exchange rates, aiming to produce a final table with figures both in local and converted (EUR) values. The tables look similar to this:

Table 1:

  

CountryDateSales (local)
AT01/01/2015111
HU02/01/2015222
DE03/01/2015333
UK04/01/2015444

Table 2:

  

DateHUFEURGBPEUR
01/01/20150.00541.2245
02/01/20150.00341.2225
03/01/20150.00281.2285
04/01/20150.00681.2215

Obviously, when calculating the figures, the script should take into account the correct exchange rate for the particular country, and also skip countries which already use EUR. The third table (or maybe append to the 1st one) I am aiming to produce should look something like this:

   

CountryDateSales (local)Sales (eur)
AT01/01/2015111123
HU02/01/201522250
DE03/01/2015333333
UK04/01/2015444234
3 Replies
senpradip007
Specialist III
Specialist III

Try like

Table1:

load

     Country,

     Date,

     [Sales(Local)]

from Source1;

left join

load

     Date,

     HUFEUR,

     GBPEUR

From Surce2;

Now you can create chart using these data.

Not applicable
Author

Hi,

This is a great idea but i don't think it will suit my needs. I would like to have the figures already calculated in the script, as in my case it won't be efficient to have the calculations in the charts.

rubenmarin

Hi Georgi, after the code proposed by Pradip you have a table with the exchange for each row (if the date exists in source2).

After that you only need to calculate the exchange:

TableWithExchangeApplied:

LOAD *, [Sales(Local)] * GBPEUR as [Sales(eur)]

Probably you'll need a field in your sales table to know wich exchange to apply (GBPEUR or HUFEUR)