Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
PrathameshPC
Contributor
Contributor

Number of Inactive, Lost accounts by Month

Hi,

I am trying to calculate number of NEW, ACTIVE, INACTIVE, LOST Accounts in a bar chart by Months.

The criteria for status is (If we take a Month e.g. Aug 21 as reference)

NEW = Made first purchase within 30 days of the reference Month

ACTIVE = Made last purchase which falls within 30 days of the reference month

INACTIVE = Made last purchase which is greater than 30 days but less than 90 days

LOST = Made last purchase which is greater than 90 days from the reference month.

I am struggling with showing the Inactive and lost accounts as the thresholds are greater than a period of a month.

3 Replies
Saravanan_Desingh

Please post some sample data and expected output

PrathameshPC
Contributor
Contributor
Author

Sample Data with 2 accounts and 1 Product

Account NameSalesOrderDateProduct
ABC452.540501-01-2021A
ABC790.480101-25-2021A
XYZ643.16601-15-2021A
XYZ871.125202-24-2021A
XYZ913.157603-12-2021A
XYZ61.3509104-18-2021A
XYZ686.871505-05-2021A

 

Expected output (attached)

PrathameshPC
Contributor
Contributor
Author

Account ABC should be shown as

Active in Jan

Inactive in Feb and Mar

lost in Apr

if an Account is lost it should not be shown lost in the next month

XYZ will be active throughout the months