Cohort Analysis - Exit Period and Exit Month

Hi Everyone,

I am working on a cohort analysis similar to what Sam created in this video:

Time Based Cohort Analysis - How To Setup Your Data Model In Power BI

I need help with the DAX calculations for Exit Period and Exit Month as you can see in the table on the right-hand side in the video.

Can anyone provide some assistance?

Thanks

@powerbi_jp,

The best way to get support on the forum is to post a copy of your PBIX file to date, so we can see how your data model is set up, what DAX you’ve written so far, how it’s branched, etc. That will allow us to see exactly where you’re running into trouble, and to provide a specific solution.

  • Brian

Hello @powerbi_jp,

Thank You for posting your query onto the Forum.

Below are the given formulas about how “Exit Month” and “Exit Period” in the Time Based Cohort Analysis.

Exit Month = 
VAR ExitDate = [Exit Date]

RETURN
CALCULATE( SELECTEDVALUE( Dates[Month & Year] ),
    FILTER( ALL( Dates ), Dates[Date] = ExitDate ) )


Exit Period = 
CALCULATE( SELECTEDVALUE( 'Cohort Periods'[Period] ),
    FILTER( 'Cohort Periods',
        [Retention Days] > 'Cohort Periods'[Min Days] && 
        [Retention Days] <= 'Cohort Periods'[Max Days] ) )

Also providing a working of the files as well as some of the links from the education portal about the videos on “Cohort Analysis”.

Hoping you find this useful and meets your requirements. :slightly_smiling_face:

Thanks and Warm Regards,
Harsh

Cohort Analysis Deep Dive - Harsh.pbix (1.1 MB)

Oh, wow, that was quick! Thanks @Harsh!
Appreciate you even including the PBI file.

Thanks!

Hello @powerbi_jp,

You’re Welcome. :slightly_smiling_face:

I’m glad I was able to help you.

Thanks and Warm Regards,
Harsh