Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
Can you please help me with the below qlik requirement
Let’s say I have a Below Table
Id, removal date
1,12/19/2019
2,06/10/2021
I need to create one more column which is called as due date:display the next due dates based on removal date on following schedule removal+60,removal+180 days,every 180 days there after
Expected output
Id,removaldate,due date
1,12/19/2019,(2/17/2020,6/16/2020,12/13/2020,6/11/2021,12/8/2021)
2,06/10/2021,(8/9/2021,12/7/2021)
It will stop when next date is <=today
As below;
raw:
Load Id,date#(removaldate,'MM/DD/YYYY') as removaldate Inline [
Id, removaldate
1,12/19/2019
2,06/10/2021
];
NoConcatenate
duedate:
Load *
Where mod(rrr,3)=0 or rrr=1;
Load
Id
,date(removaldate + IterNo()*60) as duedates
,iterno() as rrr
Resident raw
While
date(removaldate + IterNo()*60) <= today();
In chart Use measure as = concat(duedate,', ')
or below if you want a concatenated list in the main table
raw:
Load Id,date#(removaldate,'MM/DD/YYYY') as removaldate Inline [
Id, removaldate
1,12/19/2019
2,06/10/2021
];
left join(raw)
duedate:
Load Id
,Concat(duedates, ', ', rrr) as duedates
Where mod(rrr,3)=0 or rrr=1
group by Id
;
Load
Id
,date(removaldate + IterNo()*60) as duedates
,iterno() as rrr
Resident raw
While
date(removaldate + IterNo()*60) <= today();