Discussion board where members can get started with QlikView.
I am new to QlikView and bumped into a problem to which I can not find a solution. I am loading the table below:
And before storing it to qvd, I want to populate DATE field with YYYYMM values wich are betweeen current dates. Desired result should look like this:
Does anyone know how should I aproach this problem. Any hint is apreciated!
Go to Solution.
Try this may be:
Date(Date#(Date, 'YYYYMM'), 'YYYYMM') as Date,
EmpID, Date, DepID, Dep_Desc
1, 201504, A1, MainA
1, 201508, A1, MainA
1, 201511, A1, A Main
Date(AddMonths(MinDate, IterNo()), 'YYYYMM') as Date
While AddMonths(MinDate, IterNo()) <= YearEnd(MinDate);
Min(Date) as MinDate
Group By EmpID;
If(IsNull(DepID), Peek('DepID'), DepID) as DepID,
If(IsNull(Dep_Desc), Peek('Dep_Desc'), Dep_Desc) as Dep_Desc
Order By Date;
DROP Table Table;
View solution in original post
Have a look here: Generating Missing Data In QlikView
Thank you for the link Marcus and thank you for the code Sunny T. I will still need to figure out how to make it work when Date field can represent different year, but what you gave me is really helpful.