Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Question about rates

Hey guys,

In my database, I have a a rate table which loads new values in the currencyrate everyday. Thing is it is mapped to EUR (is set to 1)

So to get everything into one currency my exression looks like: Sum(turnover/rate_eur)

If I would like the turnover in say CHF is it a easy way of doing that in the expression somehow?

In excel file:

Thanks!

17 Replies
Not applicable
Author

Thanks, but this is the rates hardcoded. I get an improt of rates everyday It has to be more dynamic. I mean to get the values in separate currency I would need to update the ratefactor so to speak.

sunny_talwar

I understand that, the above script was just an example. You would be loading the data from your source. I just wanted to show your the data structure and functionality. Continue to load the data from your existing source. Does it make sense?

Not applicable
Author

Yeah ok I think you where into something right I understand your thought but how would this be made to make it to SEK for example 😕

Not applicable
Author

Yes exactly like above with inline. But that example would force me to update the factor its multiplied with. Since I load the rates already I would want a smoother solution.. hmm:S

sunny_talwar

Here I am pulling the data from the Excel that was attached

CurrencyTable:

LOAD Date,

    currency,

    rate_eur

FROM

rates.xls

(biff, embedded labels, table is Sheet1$);

Right Join(CurrencyTable)

LOAD Max(Date) as Date

Resident CurrencyTable;

CurrencyMapping:

Mapping

LOAD currency,

  rate_eur

Resident CurrencyTable;

Table:

LOAD *,

  Turnover / ApplyMap('CurrencyMapping', Local_Currency) as Turnover_eur

Inline [

Turnover, Local_Currency

50, CHF

60, GBP

20, EUR

40, SEK

];


Capture.PNG



Not applicable
Author

Since I have all the values compared to EUR isnt it any smart way in an expression to just

SUM(turnover/rate_eur) * currency='SEK'

?

sunny_talwar

I have no idea how your data is structured my friend. May be there is an easier way, but until I can see what you have, its difficult to give any suggestions. What I presented was based on whatever information I had

Not applicable
Author

Pardon me Sunny, Im kinda new to this Qlik world maybe I don't provide good enough information. Im sorry. But if you look at the Qvw above maybe it gives u betetr idea?