Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I´m new with Qlikview and I need a help with the follow:
From a load script like the bellow:
Test_table:
Load
Name
Date_a, // formato (YYYYMMDDHHMMSS)
RegID_a
Resident Base_a
Join
Date_b, // formato (YYYYMMDDHHMMSS)
RegID_b
Resident Base_b
I need to add a field in the above table with the track information of records from Base_a and Base_b.
So, I need a field RegID_ab with the RegID_a information in the lines that came from Base_b with the follow condition:
> From Date_a, what is the grater and nearst Data_b, considering same Name and Flag_a = Flag_b.
In the field Interval, I need the difference between dates (Date_a e Date_b) in seconds.
Exemple of expectation:
Date_a
Flag_a
Date_b
Flag_b
RegID_ab
Interval
John
20180810145600
A_01
10
20180810145803
A_02
20
Peter
20180812040843
A_03
Susan
20180825203201
A_04
30
Bill
20180826101212
A_05
20180810145610
B_01
20180810145913
B_02
70
Andrew
B_03
20180812041048
B_04
125
Jack
20180822181002
B_05
20180826000010
B_06
12489
Notes:
Sorry, but I cant download and open qvw files, so please answer with the suggested sript and I will test.
Thanks in advance !!!