I would like to count distinct different CustomerIDs by ProductIDs where sum of Amount is different then zero. At the same time I would like to get result for current year (2019) and result for previous year (2018). So when I would choose Year=2019 in qlikview, I would like to get pivot table with next result:
CustomerID Result for current year Result for last year 1 1 2
2 1 0
3 1 0
With help from some of you I have found solution for current and previous year, but when I put set analysis in expression for previous year it doesn't work - it gives wrong result. Here is expression I use for previous year:
If some of you knows how to repair this expression that it would work for previous year I would be extremly happy, since I have tried really a lot of possibilities. Or if anyone has maybe idea how to get this thing work with any other expression? Thanks in advance.
Believe the first one is the best bet, and there are a couple other links at the bottom of that post as well. Best I can do for you, and my post will kick things back up, but cannot say if anyone else will chime in or not.
To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question. I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.