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

Problem with set analysis

Hi Guys,

I wnat to create a table with the following formula:

    - I want to show the customers that did not buy in the selected month and bought in the previously (Lost). In the file attache if you select April the RED table has to show the following records in red: C000005, C000006 and C000008

CustomerIDDateSalesid
C00000131/01/2015A
C00000231/01/2015B
C00000331/01/2015C
C00000431/01/2015D
C00000128/02/2015E
C00000228/02/2015F
C00000528/02/2015G
C00000628/02/2015H
C00000531/03/2015I
C00000631/03/2015J
C00000731/03/2015K
C00000831/03/2015L
C00000730/04/2015K
C00000930/04/2015M

Many thank's guys

Eduard

1 Solution

Accepted Solutions
rubenmarin

Hi Eduard, the selection in month is messing with your expression, ignore selections in months:

count({<MonthIndex={'$(VPriorMonth)'},CustomerID=E({<MonthIndex={'$(VCurrentMonth)'}>}CustomerID), CalendarMonthName>} distinct CustomerID)

View solution in original post

2 Replies
rubenmarin

Hi Eduard, the selection in month is messing with your expression, ignore selections in months:

count({<MonthIndex={'$(VPriorMonth)'},CustomerID=E({<MonthIndex={'$(VCurrentMonth)'}>}CustomerID), CalendarMonthName>} distinct CustomerID)

ecabanas
Creator II
Creator II
Author

Many thank's Ruben