Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm new to using a set analysis and have watched a few videos, but am still having a problem getting this to work correctly. I'm using QlikView 12, and I'm wanting to get a count of values from a year prior to the date. Here is the formula I'm using:
Count({$<[Date]={"$(=addyears([Date],-1))"}>}[Date])
So I'm trying to get something that lists my Date, the Date a year ago, the count of values for the Date, and the count of values for a year ago from the Date. Any help as to what I'm doing wrong would be greatly appreciated.
Would you be able to share a sample to show your issue?
Attached is a sample of the document/data I'm working on. It's the 4th column (2nd expression) I'm having problems with. Looking at that sample data, here is what I'm needing the first row to look like:
Date Date PY Count CY Count PY
6/6/2017 6/6/2016 98 103
Use The As-Of Table here
Table:
LOAD Date,
[Count CY]
FROM
Book1.xlsx
(ooxml, embedded labels, table is Sheet1);
AsOfTable:
LOAD Date as AsOfDate,
Date,
'CY' as Flag
Resident Table;
Concatenate (AsOfTable)
LOAD Date as AsOfDate,
Date(AddYears(Date, -1)) as Date,
'PY' as Flag
Resident Table;