community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.
Getting started with Designer? | Start your journey with our new Learning Path!

Challenge #17: Month-over-Month Retention Rate

Highlighted
Alteryx Alumni (Retired)

Here is this week’s challenge, I would like to thank everyone for playing along and for your feedback. The link to the solution for last challenge #16 is HERE. This week’s assignment is listed as an advanced exercise due to the requirement of using a batch macro for the solution.

 

The use case: A bank is looking to calculate customer retention rate month over month. The numerator in the calculation are all of the accounts open 24 months prior to the start of the month. For example, for June 2013, the numerator would be the total number of accounts open between June 1, 2011 through May 31, 2013. The denominator will be total number of accounts closed in June 2013 or between June 1, 2013 through June 30, 2013.

 

The objective is to create a batch macro that calculates the retention rate for May, June, July and August.

Creative Director
Creative Director

The solution has been uploaded

Spoiler
17.png
Tara McCoy
Bolide

It's nice to see the macro answer and learn something new!  I got stuck on this one since I was trying to do it without adding a start of month table and I have very little experience with macros.  I was able to solve it without using a macro and without having to manually add a Start of Month table.  I had one hard coded filter to remove activity prior to May 2013 so that my results matched the same date ranges shown in the solution.  It doesn’t really need to be included to make this work.  The 24 month criteria for calculating the numerator (open accounts from prior 24 months) is also hard coded based on the directions.  Everything else is dynamic so that if you had accounts older than 24 months they would not be included in the calculation nor would you need to add a record in the Start of Month table to include September 2013.  I annotated the best I could while trying to keep the canvas clean.  I could have added tool containers, but I need to move on.  I chopped it into 2 pictures so that it is legible.  I’d be happy to answer any questions on the workflow formulas.

 

Spoiler

week16_part1.PNG
week16_part2.PNG
Nebula
Nebula

Quite a different approach within the Batch macro from @GeneR's (or @TaraM's) solution, but the inputs to the batch macro are very similar.

 

Spoiler
- Added a set of fields to make maintanability easier and the logic more obvious:
    - One for the control param being the month in question
    - one for a date 24 months previous
    - one as a boolean flag to say "is this account open right now"
    - one as a flag to say "did this account close in the window in question" etc
- Then we just take a sum across these flags
- Then, same as @GeneR / @TaraM, calculate the ratio and send out to the calling macro

I didn't use the control param through an action component - but instead straight into a formula

 

Magnetar
Magnetar

My solution. Watched the webinar on Batch Macros today, so this one was perfect practice :) Pretty pleased I was able to do this one in just a few tools!

 

Note: The instructions indicate numerator is Open & denominator is Closed, but then results in the start file have it showing calculated as the opposite. In addition, I believe to be accurate with identifying a true "Retention Rate," you'd want to know the # of customers remaining after closed accounts... so wouldn't it be (Open - Closed)/Open? Just a thought. I solved for both in my solution, just in case!

 

Spoiler
WeeklyChallenge17.JPG
Pulsar
 
Alteryx Certified Partner

Here is my solution! 

Asteroid

This one was a struggle for me, but finally managed to solve and it looks to be similar to other solutions.

Spoiler
Week17Challenge.pngWeek17ChallengeMacroPic.png
Alteryx Certified Partner

I had to look at the solution for this to help get my Open/Close formula correct :(

 

Spoiler
Weekly Challenge 17.png
Spoiler
Capture.PNG