Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlikuser09
Creator II
Creator II

How to get the customers that are not part of the sales in the last three months? using Year Month

Customer IDPurchase year month
12021-4
22018-3
22021-2
32021-1
42018-4
42020-4
52021-5
62021-6
72021-7
72018-5
82017-3
92020-7
102020-3
112021-1

 

({$<Customer ID=p()*e({<Date={">=$(=AddMonths(Max(Date),-3))<$(=Max(Date))"}, YearMonth=>}), YearMonth=>} This is not working

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

It should be only this.

Count({<Customer = e({<Date = {">=$(=Addmonths(Max(Date),-2))"}>})>}Customer)

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Qlikuser09
Creator II
Creator II
Author

=Count({<[Customer ID]=E({<Date={">=$(=addmonths(max(Date),-2))<=$(=max(Date))"}>}[Customer ID])>}Distinct [Customer ID )

This gives me customers  that are not been active for the past two months , but however I need the customers that are not active /not part of the sales product (not active for each specific product in the last two months)

Kushal_Chawda

@Qlikuser09  create a graph or table with below dimension and measure will give you what you want

Dimension: Product

Measure: 

 Count({<[Customer ID]=E({<Date={">=$(=addmonths(max(Date),-2))<=$(=max(Date))"}>}[Customer ID])>}Distinct [Customer ID )