Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Qlik Sense experts,
I am new to Qlik and have been struggling to get this expression to work properly in a table.
Columns; Order Year, Unique Items (Count(Distinct Item_Number)) and Unique Items from Year to Year
The column creating difficulties is the Unique Items from Year to Year and the expression I have been trying is in the line with;
However, it returns "0" per year
Any ideas?
Hi Kush,
Thank you for getting back again, it still return empty year column and 0 Unique Items Year to Year.
Do you need the unique count of items which do not exist in the previous years?
Hi again, no, I need the unique count of what does exist in year in question AND did exist in the previous year (singular). I.e. distinct items that exist in both year and year -1
Hi Lasse,
If I understood your issue correctly, you need the distinct count of common items in this year and the previous year.
If so try this expression:
Expecting that you having a master calendar:create flags for this year and previous years using the inYear() function.
Once done: use this expression
count( {<items = P({1<[last year flag]={1}>} items)>}>} distinct items)
This will give you only the distinct count of common items bought in both the years
Thanks,
Sangram.