Discussion Board for collaboration related to QlikView App Development.
Please find the sample data in the attachment.
I need to create a pivot table with dimensions
Dim 1 : Current year Months (month(DATE1))
Dim 2 : Dept Field (DEPT1)
and two expressions
Exp1 : Count(EMPID) wrt month
Exp2 : Count(EMPID) wrt previous month.
O/P should be like this:
LOAD date(DATE1,'DD-MM-YYYY') as DATE1,
(ooxml, embedded labels, table is Sheet2);
LOAD min(DATE1) as MinDate,
max(DATE1) as MaxDate
year(DATE1) as Year,
month(DATE1) as Month,
monthname(DATE1) as MonthYear;
LOAD date(MinDate+IterNo()-1,'DD-MM-YYYY') as DATE1
DROP Table Temp;
View solution in original post
Thank you so much for the help. But I forgot to mention this point. I need to achieve o/p in front end only. I should not change data model. Please let me know if any possible way. Thank you.
Thank u bro...I got it.
Its very nice solution, just one doubt, how above function works in this situation a little bit confused, if you take for eg
Month January how to takes the values of December Department Wise, can you explain a bit.
Above function works based on the dimension values. In this case above function picks the value based on the department & month.
So Data is aggregated like below
Now above will pick the value which is one row above
So for D1-Feb above will pick the value of D1-Jan