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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Rajan_AN
Frequent Visitor

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. 

Rajan_AN_0-1715101349049.png

@Anonymous

2 REPLIES 2
v-kaiyue-msft
Community Support
Community Support

Hi @Rajan_AN ,

 

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.

vkaiyuemsft_0-1715154519653.png

 

vkaiyuemsft_1-1715154519655.png

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.

GilbertQ
Super User
Super User

Hi @Rajan_AN 

 

You can use this DAX pattern from SQL BI for the Lost Customers for what you are looking for: Calculate New, Returning, Lost, and Recovered Customers in #dax - SQLBI





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors