Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
sudheerbolla
Helper II
Helper II

Need Help in creating running total in cohort analysys

Hi everyone, 

I am completely new to Power BI, Could someone help in in creating running total in cohort analysis please. Thanks in advance

 

Policy Attrition Count:

The following table obtained:

POLICY ATTRITION MATRIX (COHORT ANALYSIS)

sudheerbolla_0-1688425264898.png

 

 

Description of output: In Apr-2023, 1456 no of new policies were taken, out of 1456 new policies, 20 no of policies were cancelled in Apr-2023, and 63 no of policies were cancelled in May-2023 excluding the 20 no of policies cancelled in Apr-2023.

The above output obtained by using the following DAX function

Policy Attrition =

VAR vCurrentMonthAfter = SELECTEDVALUE(Tenure_Table[Value])

VAR vCurrentCohort = SELECTEDVALUE(Consolidated[Cohort])

VAR vleft =

CALCULATE(

    [NewPolicies],

    FILTER(

        Consolidated,

        EOMONTH(Consolidated[PolicyCancelDateColumn],0)=EOMONTH(vCurrentCohort,vCurrentMonthAfter)

    )

)

RETURN

vleft

 

 

Tenure_Table = GENERATESERIES(0,24,1)

 

 

Cohort =

VAR vPolicyNo = Consolidated[POLICY_NUMBER (Imported)]

VAR vResult = CALCULATE(

    EOMONTH(MIN([PolicyPurcDateColumn]),0),

    FILTER(Consolidated,Consolidated[POLICY_NUMBER (Imported)]=vPolicyNo)

)

RETURN

vResult

 

NewPolicies = DISTINCTCOUNT(Consolidated[POLICY_NUMBER (Imported)])

 

 

 

How to get the cumulative policies cancelled output as below. How to write the dax function to get the following output

 

POLICY RETENTION MATRIX (COHORT ANALYSIS)

 

 

 

 

 

 

 

 

The above out put will help  me in creating the retention matrix, by substracting the retention matrix values from the new policies count.

 

sudheerbolla_2-1688425264840.png

 

 

 

0 REPLIES 0

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.