Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

currency change

Dear All,

I have 2 table as in attachment..1st having transaction data and in which value is in INR.. and

In 2nd table date wise $ rates are given... as

from >=1/1/2014 to <2/1/2014 rate is 56...then

from >=2/1/2014 to <2/25/2014 rate is 61..then

from >=2/25/2015 to <7/13/2014 rate is 60..and so on as in attachment..

and i have to create a table having column of Value (S) as per dates..

Value of $ = Value(INR) / $ Rate

Please tell me the solutions...

Rahul

1 Solution

Accepted Solutions
maxgro
MVP
MVP

not completely, see another attachment, now the script is very simple

View solution in original post

5 Replies
maxgro
MVP
MVP

see attachment

Not applicable
Author

Thanks for example massimo...but is there are any other option which can be used in the front end only..in dimension or expression tab??

maxgro
MVP
MVP

not completely, see another attachment, now the script is very simple

Not applicable
Author

thanks massimo...

can u plz describe "date(alt(peek(Date2)-1,makedate(2099)))"...

maxgro
MVP
MVP

Date2, Date3

01/02/2014

25/02/2014

17/10/2014

I want in Date3=end of date range the start (Date2) of next row - 1

So I read Date2 in descending order and with peek (Date2 previous row) -1 set Date3; peek(Date2)-1

Date2, Date3

01/02/2014     24/02/2014

25/02/2014     16/10/2014

17/10/2014    

Last Date3 is missing

I use alt to replace the missing with a big date makedate(2099); it could be makedate(3000), makedate(2100,12,31)..

makedate(2099) --> 01/01/2099

alt(null(), makedate(2099)) --> 72686      (number of 01/01/2099, alt get the first number)

date(alt(null(), makedate(2099))) --> 01/01/2099

date(alt(peek(Date2)-1,makedate(2099))) as Date3,

when there is a previous row I get the Date2 of previous row, else 01/01/2099