I am trying to create an expression in qlik sense to get the count the distinct number of ID's where each prod is added up and is greater than 0.
Qlik sense expression so far, but wrong:
sum(aggr(count (DISTINCT ID), PROD1 + PROD2 + PROD3 ))
I'm not too sure how to add to the expression where to add >0 and the year month.
Working sql:
select count(distinct ID) as Number
from tb1 x
where (x.Prod1 + x.Prod2 + x.Prod3)> 0
x.Year = '2016/05'
Any help would be great,
Thanks.