Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Urgent HELP needed!!!

Hello Team,

I'm currently working on creating a report on customer churn. Here are some points I need your help in: 

  1. I need to calculate the total number of customers I had in the previous year, considering only those customers who had non-zero revenue and volume.

  2. For calculating churn rate, I want to identify customers who generated revenue in the previous year but didn't generate any revenue in the current year. As an example, if we take 2023 as the current year and 2022 as the previous year, a customer with ID 74 would be considered a churned customer.

  3. I also need to figure out how to present the year-on-year calculation for customer churn.

Here is the link to sample dashboard 

Please help me out I am really stuck here. 

Anonymous

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    Thanks for the reply from GilbertQ , please allow me to provide another insight: 

     

    1. Create a measure to get the number of customers whose revenue and quantity were not zero in the previous year.

    previous year total =
    CALCULATE(DISTINCTCOUNT('Sample table'[Customer ID]),FILTER(ALL('Sample table'),'Sample table'[T-DI-A: Calendar Year] = SELECTEDVALUE(' Sample table'[T-DI-A: Calendar Year]) - 1 && 'Sample table'[Total Revenue] <> 0 && 'Sample table'[Total Volume - Liters] <> 0))

     

    2. Create a measure to get the churn customers.

    churn customers =
    VAR _pre_revenue = CALCULATE(SUM('Sample table'[Total Revenue]),FILTER(ALL('Sample table'),'Sample table'[T-DI-A: Calendar Year] = SELECTEDVALUE('Sample table'[T-DI-A: Calendar Year]) - 1 && 'Sample table'[Customer ID] = MAX('Sample table'[Customer ID]) ))
    RETURN
    IF(_pre_revenue <> 0 && SUM('Sample table'[Total Revenue]) = 0,1,0)

     

    3. Put churn customers into the filter to show the data with result 1.

     

    If your Current Period does not refer to this, please clarify in a follow-up reply.

     

    Best Regards,

    Clara Gong

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Thanks for the reply from GilbertQ , please allow me to provide another insight: 

     

    1. Create a measure to get the number of customers whose revenue and quantity were not zero in the previous year.

    previous year total =
    CALCULATE(DISTINCTCOUNT('Sample table'[Customer ID]),FILTER(ALL('Sample table'),'Sample table'[T-DI-A: Calendar Year] = SELECTEDVALUE(' Sample table'[T-DI-A: Calendar Year]) - 1 && 'Sample table'[Total Revenue] <> 0 && 'Sample table'[Total Volume - Liters] <> 0))

     

    2. Create a measure to get the churn customers.

    churn customers =
    VAR _pre_revenue = CALCULATE(SUM('Sample table'[Total Revenue]),FILTER(ALL('Sample table'),'Sample table'[T-DI-A: Calendar Year] = SELECTEDVALUE('Sample table'[T-DI-A: Calendar Year]) - 1 && 'Sample table'[Customer ID] = MAX('Sample table'[Customer ID]) ))
    RETURN
    IF(_pre_revenue <> 0 && SUM('Sample table'[Total Revenue]) = 0,1,0)

     

    3. Put churn customers into the filter to show the data with result 1.

     

    If your Current Period does not refer to this, please clarify in a follow-up reply.

     

    Best Regards,

    Clara Gong

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.