Skip to main content

Hey everyone!

 

I’m trying to create a cohort framework in the backend of the model. To do this, I’m using my Datahub::Month dimension and my Revenue app::Cohort Months dimension. It should generate something like:

                    0             1             2

Jan 23    Jan 23     Feb 23    Mar 23

Feb 23   Feb 23     Mar 23    Apr 23

Mar 23   Mar 23     Apr 23    May 23

 

and so on.

 

Is this the best practice to enable cohort logic for things like churn?

 

To create my Cohort Months dimension, I can manually type integers 0 through 60 for example, but is there a way to use PREVIOUS() to just increment 1 each row to do this? Screenshot:

 

 

Screenshot of the cohort matrix I’ve produced re: is this best practice question above

 

 


Hi Trever ! 
Yes, it’s still best practice to do this 🙂
Regarding your first question, you can automatically populate the cohort month number with a formula of this type: CUMULATE(1, ‘Revenue Cohort Month’)   

Previous only works on metrics. 

For your second formula: 
Month + ‘Revenue Cohort Month’.’Cohort Month’ should be enough


Merci bcp @Ben A!


@Ben A the CUMULATE(1, ‘Revenue Cohort Month’) starts at 1, is there a way to zero-index?


Of course, you can simply add a -1 afterwards 


Reply