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

Lost/Inactive customers

Hi All,

I want to find total inactive customers for last 12 months on month basis which means they have placed order before 12 months back and became in active. So want calculate this every month basis to under stand how inactive customers are growing month by month. if I run the query in July it should go back 365 days from the previous month end and give total number of inactive customers. I want to do this month by month.

Thanks for your time in advance.

below are the expected results

  

month   inactive customers
Jan-181
Feb-180
Mar-180
Apr-181
May-182
Jun-182
1 Solution

Accepted Solutions
qlikviewwizard
Master II
Master II

Hi madhuqliklondon

You are confusing.Order Date is showing June -2018 itself. Please check this updated script and output.

Capture.PNG

Capture1.PNG

View solution in original post

13 Replies
CarmenReilly
Former Employee
Former Employee

Hi Madhu!

You should be able to do this using a calculated dimension: https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Straight_Table.htm (scroll down to the Chart Properties: Dimensions section).

All the Best,

Carmen

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.

Anonymous
Not applicable

Hi Madhu,

Can you share sample data In an excel ot txt?

madhuqliklondon
Creator II
Creator II
Author

Hi John,

Please see the attachment . Sheet 1 is sample data and sheet 2 is expected results.

Thank you

qlikviewwizard
Master II
Master II

Hi,

Is this you are expecting?

Capture.PNG

madhuqliklondon
Creator II
Creator II
Author

Hi Arjun,

This expression is giving only results for 2018, I want this to work for back years as well. In example I have just mentioned 2017 and 2018 as sample data. I have years going back to 2007.

qlikviewwizard
Master II
Master II

If you want all the data:

Remove Year={Max(Year)} condition in the set analysis. Then you will get all other Years data.

If you want see 2017 and 2018 (Max 2 Years data) :

COUNT ({$<Year={$(=Max(Year)), $(=Max(Year)-1)}>}  Cusomer Id)

Please use this. You will get the required answer.

Anonymous
Not applicable

Hello Madhu,

Can you give some explanation about the expected out put , how did you achieve in Excel?

qlikviewwizard
Master II
Master II

Hi madhuqliklondon

Did you get the correct answer?

If yes, please select Correct Answer and close the thread.

Thank you.

madhuqliklondon
Creator II
Creator II
Author

Hi Arjun,

I would like to see past 10 years data ,Because data in QVD's available from 2007. Is there way ?

 

Examples Where:
Lapsed Customers: = count of CustomerIDs which had no sales activity in the 12 months up to and including the specified month (in first column above), AND did have >0 activity in the one month before that .
I.e. Customers counted as lapsed in July 2018 would all have purchased in last June 2017 , then nothing in next 12 months
Reactivated Customers:= count of CustomerIDs which had >0 sales activity in the specified month, AND no sales activity in the previous 12 months before that.
I.e. Customers counted as reactivated in July 2018 would all have purchased in July 18, but nothing in Last 12 months.
A customer might lapse and reactivate a number of times through the time period.