Discussion board where members can get started with QlikView.
Is there an elegant way to show change in names between 2 days.
Displaying 1) new added names between last date and the date before last
2) dropped names between last date and the date before last
for example for
New in the last day compare to the day before:
Dropped on the last day compare to day before:
LOAD * INLINE [
Name, Date, Score
A, 01/01/2018, 1
B, 01/01/2018, 2
C, 01/01/2018, 3
D, 01/01/2018, 4
E, 01/01/2018, 5
A, 02/01/2018, 6
B, 02/01/2018, 7
F, 02/01/2018, 8
G, 02/01/2018, 9
A, 03/01/2018, 10
B, 03/01/2018, 11
C, 03/01/2018, 12
D, 03/01/2018, 13
E, 03/01/2018, 14
You'll have to do some script manipulating:
dates_table: //sorted dates table
LOAD distinct Date Resident main Order by Date asc;
left join (main)
LOAD Distinct '$(before_max_date)' as Date, Name, 1 as flag1 Resident main
LOAD Distinct '$(max_date)' as Date, Name, 1 as flag2 Resident main
LOAD Date, Name, Score
, if(Date = '$(before_max_date)',
, if(Date = '$(max_date)',
)) as flag
Just place it after your Inline part.
And, I also attaching a file!
Hope that's what you're lookin for!
View solution in original post
Many thanks Sergey!