Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Active Customer Calculation

hi i am trying to achieve the following if a customer has bought something the last two years then active if hasnt then inactive

i have the following statement but it is not working as i assumed;

if(Year > max(Year-2),

if(Sum($(vNettoFsg)) > 0, Count(Customer))

please advise.

Best,

Brad

Labels (1)
2 Replies
giakoum
Partner - Master II
Partner - Master II

Hi.

I would propose that you do this check in the reload script. If it is not possible, please attach a sample application so that I can try on that.

Ioannis.

Not applicable
Author

Hi,

you can use nested set analysis.

Try something like this,

count({<Customer={"=sum({<Year={'>=$(=max(Year)-2)"}>}Sales)>0"}>}Customer)