Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Based on a Customer List and number of products purchased by them month on month, I need to categorize the customers into the following categories.
Active – Customers who have been purchasing products month on month basis CONTINUOUSLY
Inactive – customers who have not purchased any item for the chosen year, month range
Returning – Customer Purchased a product initially and thereafter no activity (say 3 months gap max between purchases)
New – No Purchase by the customer yet. Customer just created or yet to start any transaction.
Dimensions used:
CustomerName
Year
Month
Expression:
Sum(Quantity)
Note: he above categories should be set based on year and month selection. The user has the option of choosing any year and month and see the customer status
Sample Output:
Yr --> | 2016 |
| ||||
Mnth --> | 1 | 2 | 3 | 4 | 5 |
|
Customer Name | Status | |||||
ABC Technologies | 45 | 60 | 20 | 35 | 81 | Active |
BDB Technologies | 50 | 23 | 50 | - | - | Inactive |
BDB Technologies | 50 | - | 50 | - | 20 | Inactive |
DHA Technologies | 86 | - | - | - | - | Returning |
EAB Technologies | - | - | - | - | - | New |
This is something I would probably do it in the script. Could you post your sample data set (may be in an INLINE table with qvw file)?