
I have a table similar to the following.
Account IDPurchase IDSubscriptionExpired?
1
1
TrialT12PremiumF13PremiumF24TrialT25PremiumT36TrialT37PremiumT38PremiumFEssentially I want to be able to group each account into a category based on the state of their transactions.
If a user has a single Premium subscription active - label them as 'Premium' (User 1)
If all of a user's subscriptions are in an expired status - label them as 'Expired' (User 2)
if a user has 2 or more active Premium subscriptions - Label them as 'Elite' (User 3)
At then end, I want to be able to do a count of distinct account ID's that fall into each category.
Premium - 1
Elite - 1
Expired -1
Hi Sarah,
If I understood your criteria, here's my approach:
I created a subscription flag calc to flag the criteria you were looking for:
Created a FIXED LOD to ACCOUNT ID to determine when using the Subscription Flag calc, what their named status would be if Elite:
Created a FIXED LOD to ACCOUNT ID to determine when using the Subscription Flag calc, what their named status would be if Expired:
Created a FIXED LOD to ACCOUNT ID to determine when using the Subscription Flag calc, what their named status would be if Premium:
Created a calc to bring all 3 statuses into one column/field; probably could've done all 3 fixed calc's in one...but gave them to you separately in the event you want to use them elsewhere.
Final result after removing the extra columns:
Last was to create the worksheet for a count by Status type which is just a simple COUNTD([Number of Records] using the new Status pill:
A 2018.3 workbook is attached. Hope it helps! Thx, Don