Discussion Board for collaboration related to QlikView App Development.
I have a complex scenario for rolling data.
Earlier we used to roll by picking up value from previous row, so for example , if I got 100/- as my value on 15th Jan and no data thereafter, I rolled it till date.
Now the requirement is to roll only for 7 days and then stop rolling.
Considering, I am looking at data values from 15th - 31st Jan
For Example ,
My Rolled data should look like :
Can anyone plz help?
Any inputs , anyone?
Your requirement is not clear , what you want to achieve is not clear . Please provide more information
I want to roll data , but not indefinitely , it should be rolled only for a max period of 7 days.
For example , I receive records daily , on 15th Jan 2016 , I receive VOLUME=1000.
for the next 20 days I get this value as NULL in my data.
Rolling for 7 days means , till 22nd Jan 2016, VOLUME would be populated as 1000, after 22nd Jan, I should get it remain as NULL.
After 20 days , again I get VOLUME=2000 . Rolling will start as mentioned above.
Check if this Helps
A:LOAD * INLINE [ ID, Date, Volume, Qty 1,15/05/2016,100,10 1,25/05/2016,,5 1,29/05/2016,200,];
ID,Date ,if( not isnull(Previous(Date)) and ID = Previous(ID) ,Previous(Date), date(Date+1)) as Todate
Resident AOrder by Date desc;
Final:load ID,Date,date(Date+IterNo()-1) as DateGen,Volume, Qty,if( date(Date+IterNo()-1) <= date(Date+7),Volume) as NVolume,if( date(Date+IterNo()-1) <= date(Date+7),Qty) as NQty
Resident AWhile date(Date+IterNo()-1) < date(Todate);
DROP Table A;
This is needed in the script or front end? Also it seems that above is the expected output you want to see, would be able to share the raw data behind the output?
Go through This,
Its Property Of Expression,
For Data Rolling.