Discussion Board for collaboration on QlikView Scripting.
I'm having some trouble with this function.
The thing is that i have a budget table that the records are made by start and end date.
So, it's like this:
Product Start Date End Date Value
Product A 201301 201307 1000
and i would like to make a table like this:
Product Date Value
Product A 201301 1000
Product A 201302 1000
Product A 201303 1000
Product A 201304 1000
Product A 201305 1000
Product A 201306 1000
Product A 201307 1000
I know that autogenerate probably will do the trick but i just don't know how to do it.
So, can anyone help me out?
PS: Did i posted in the right place?
Go to Solution.
Looping works. Something like this:
StartDate + iterno() - 1 as Date
while StartDate + iterno() - 1 <= EndDate ;
see this very good post
Try like below:
LOAD Product ,
[Start Date] + IterNo() -1 AS Date
While [Start Date] + IterNo() -1 <= [End Date];
Please find the attached qvw as reference.
Try like this
Date(MonthStart(StartDate, IterNo() -1), 'YYYYMM') AS Date
While Date(MonthStart(StartDate, IterNo() -1), 'YYYYMM') <= EndDate;
Date(Date#([Start Date], 'YYYYMM')) AS StartDate,
Date(Date#([End Date], 'YYYYMM')) AS EndDate,
Product, Start Date, End Date, Value
Product A , 201301, 201307, 1000];