Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jood_ahmad
Creator II
Creator II

Set Analysis On previous 4 month

Dears,

Can any one help me on this;

I need to get the new Customers & Old Customers from the customers table, the old customers that he inactive since 4 month and the new customer is active in the 4 month, i try to tack the max date -4 to get the count for customer(old) but did not work.

or how can i count the frequency for customer id in Max  Month -4 (last 4 month)

Regards.

Message was edited by: Ahmad Kastero

4 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

if you can use set analysis

with this expression for the dates

sum({<date={"$(=addmonths(max(date),-4))"}>})

maxgro
MVP
MVP

=count({$ <date={"<=$(=Addmonths(max(d),-4))"}>} customer)  

jood_ahmad
Creator II
Creator II
Author

Thank you But still not work

jonas_rezende
Specialist
Specialist

Hi, ahmadkastero‌.

See if expression work like desired.

Count({1<%Date = {">=$(=MakeDate(Year(Max({1}%Date)-120),Month(Max({1}%Date)-120)))"} >} Customer)

The identifier can be modified of agree with your choice, example: $, 0,$1.

Hope this helps!