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: 
andrea0901
Creator
Creator

date conversion in qlikview

Hi friends,

 

Please help me with the below scenario.

 

i have a currency date format as 10.01.2009

and document date format as 2018-05-22

 

as per the document date i need to fetch the currency dates in front end.

i do not want to change the date format , both the date formats should be as above but need to map and fetch both the data from those columns.

please kindly help.

3 Replies
uacg0009
Partner - Specialist
Partner - Specialist

Hi Andrea,
Do you mean you want to keep the format for those 2 columns in back-end?
If yes, I think you can use:
date(currency_date,'MM.DD.YYYY') as currency_date,
date(document_date,'YYYY-MM-DD') as document_date

If not, could you please clarify what you want?
Thanks.
Aiolos
andrea0901
Creator
Creator
Author

Hi,

Actually below is my requirement:

 

Currency dateExchange rateDocument DateLookup
11.01.20194.2087012.01.2016#N/A
10.01.20194.2329512.02.2016#N/A
09.01.20194.2369511.01.20194.2087
08.01.20194.2103510.01.20194.23295
07.01.20194.2013509.01.20194.23695
04.01.20194.2032008.01.20194.21035
03.01.20194.1866507.01.20194.20135
02.01.20194.1758004.01.20194.2032
28.12.20184.2070503.01.20194.18665
27.12.20184.2092502.01.20194.1758
26.12.20184.1959528.12.20184.20705
21.12.20184.1885027.12.20184.20925
20.12.20184.1901526.12.20184.19595
19.12.20184.2100021.12.20184.1885
18.12.20184.1865020.12.20184.19015
17.12.20184.1780019.12.20184.21
14.12.20184.1657518.12.20184.1865
13.12.20184.1460517.12.20184.178
12.12.20184.1758514.12.20184.16575
11.12.20184.1681013.12.20184.14605
10.12.20184.1780012.12.20184.17585
07.12.20184.1958511.12.20184.1681

first A, B, C columns i have pulled. 

i have to derive the 4th column (i.e Lookup)

First i need to search whether the document date is present in Currency date, if the exact date is there then i have to derive that date's exchange rate column. 

Second, if the document date is not equal to currency date, i need to take the next highest date based on the document date and derive that date's exchange rate column. 

 

could u please help in qlikview how to derive the whole scenario.

uacg0009
Partner - Specialist
Partner - Specialist

Hi,
According to your scenarios, could you please give a sample for the second one?
because for the first scenario, you can use left join to solve it, like:
left join
load currency_date as document_date,
exchange_rate as lookup
resident yourtable;

Aiolos