Membership Length
Hi new user here,
I have a question about getting the membership length of our customers and I am doing this as a beast mode for a card:
- I need to find the start date of membership
- I need to find the end date of membership
- Finally the avg time they have been a member
I used the following case statement to try and find the start and end dates:
- StartDate - Beast mode calculation
- CASE WHEN
countasUWCsignup
= 1
ANDcustomer type
= 'UWC'
ThenDate
- EndDate - Beast mode calculation
- CASE WHEN
countasUWCsignup
= 1
ANDcustomer type
= 'UWC'
ThenDate
- UWC is the membership type but I am not getting the correct start or end dates
If I do a filter on the card for using Customer type nd countasUWCsignup =1 I get the correct start date.
Thank you
Best Answers
-
Is there a unique ID for each customer? Is there a field that indicates a cancellation? If there is a single date column that would mean that signup and cancellation dates would be on separate rows in which case you would need to do what @MarkSnodgrass pointed out. What you've shared is not enough information to do what you are hoping.
If I solved your problem, please select "yes" above
0 -
thank you
0
Answers
-
Without seeing your data or understanding its fields it is tough to know which fields you ought to use, however the calculation is pretty straightforward once you do:
CASE WHEN `statusOfCustomer` = 'Active' THEN DATEDIFF(CURDATE(),`enrollmentDate`)
WHEN `statusOfCustomer` = 'Cancelled' THEN DATEDIFF(`cancelledDate`,`enrollmentDate`) ENDThis beastmode would give you the difference in days between those dates to calculate your average time they have been a member.
If I solved your problem, please select "yes" above
0 -
If you could provide a few sample rows of data with sensitive information obfuscated the community could likely help you figure it out.
If I solved your problem, please select "yes" above
0 -
If your start and end dates are in the same row, then it is pretty straightforward as @ColemenWilson points out. If your start and end dates are in the same column, but different rows, then you will need to use Magic ETL to get it consolidated so that the start and end dates are in the same row and separate columns.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
Hi Colemen and Mark,
Here is some sample data:
You are either a member on a certain date until you expire and that is pretty much it is setup. Hope this helps.
Thanks
0 -
Is there a unique ID for each customer? Is there a field that indicates a cancellation? If there is a single date column that would mean that signup and cancellation dates would be on separate rows in which case you would need to do what @MarkSnodgrass pointed out. What you've shared is not enough information to do what you are hoping.
If I solved your problem, please select "yes" above
0 -
thank you
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive