Discussion board where members can get started with QlikView.
I want to group the data on TransID & Department.
My Data is like this for TRSID1 & DEPT_A:
I want to show the output of Sales zero for those which the time is more than one year.
So out should be like this.
Please help me.
Thanks in advance.
Go to Solution.
May be this expression:
If(YearMonthNum <= Date(AddYears(Min(TOTAL <Department, Trans_Id> YearMonthNum), 1), 'YYYY-MM'), sum(Sales), 0)
Had to create YearMonthNum in the script because your YearMonth field was not a date field. Script (addition in red):
(ooxml, embedded labels, table is Sheet1);
Left Join (Data)
Date#(YearMonth, 'YYYY-MM') as YearMonthNum