Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
({$<Customer ID=p()*e({<Date={">=$(=AddMonths(Max(Date),-3))<$(=Max(Date))"}, YearMonth=>}), YearMonth=>} This is not working
@Qlikuser09 if your date is in proper date format then try below
=sum({<YearMonth,Customer_ID=e({<YearMonth,Date={">=$(=addmonths(max(Date),-2))<=$(=max(Date))"}>}Customer_ID)>}Sales)
Thanks for your reply, I want to get the ID's of the customers who are inactive in the last 3 months
@Qlikuser09 The expression which I have provided will give you what you want
But I am not getting distinct customer's Im getting something similar to this. Where some customer id's are repeated
Customer ID | Purchase year month |
1 | 2021-4 |
2 | 2021-4 |
2 | 2021-4 |
3 | 2021-3 |
4 | 2021-2 |
4 | 2021-2 |
5 | 2021-1 |
6 | 2021-1 |
7 | 2021-1 |
7 | 2018-5 |
8 | 2017-3 |
9 | 2020-7 |
10 | 2020-3 |
11 | 2021-1 |