Skip to main content

Hi guys,

I am struggling with a simple problem :

I have the customer ids and the login month of those customers and from this data I would like to get the following data:

1) Total logged customers in every month;

2) New customers for every month (it is present in the current month, but not present in previous month ; so if we have a customer Id in two following months then it is new only for the first month)

3) Lost customers (it is present in the previous month and not present in the current one ; if this customer is present in the first month and not present in the 2 following months, then it is lost only in the first month from the 2 following months )

I want the data aggregated : Every month and then Total logins / New / Lost for every month

I can do it on a customer_id level with showing all missing values and then some table calculations, but this is not working on an aggregated level. As I mentioned, I only need the month and then the count of Total logins / New / Lost for every month

I am attaching a sample file.

Any help will be highly appreciated!

3 answers
0/9000