Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
ariafc71
Contributor
Contributor

count the number of customers who purchased goods this  year more  than  last  year

dear community

i want  to count the number of customers whopurchased goods this  year more  than  last  year 

i  try  this  expression  ( kpi)

Count({<CustomerCode={"=Sum({<year={$(v_maxyear)}>}NetoSum)>Sum({<year={$(vprevyear)}>}NetoSum") >}distinct CustomerCode)

 

unfortunately it doesnt work

thanks for  help

ariafc71

                         
Labels (2)
2 Replies
vinieme12
Champion III
Champion III

Verify if your variables are evaluating correctly

 

OR try

=Count({<CustomerCode={"=Sum({<year={"$(=Max(Year))"}>}NetoSum)>Sum({<year={"$(=Max(Year)-1)"}>}NetoSum)" >}distinct CustomerCode)

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
khaoulaaa
Partner - Contributor III
Partner - Contributor III

Hello @ariafc71 

just a few modifications in the set analysis syntax 

=count({<CustomerCode={"=sum({<year={'$(v_maxyear)'}>}NetoSum) > sum({<year={'$(vprevyear)'}>}NetoSum)"}>} distinct CustomerCode)