cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

How to calculate Lost Customer per month with additional condition?

Hey all,

 

I've created a measure for Lost Customers following the tutorial here: https://www.youtube.com/watch?v=cfDyNPQIJtA&ab_channel=EnterpriseDNA


and the DAX is as below:

 
LostCustomers =
VAR CurrentCustomers = CALCULATETABLE(VALUES('Transaction Data'[customer_id]),
FILTER(ALL('Transaction Data'[day].[Date]),
'Transaction Data'[day].[Date] > MIN ('Transaction Data'[day].[Date]) - 365 &&
'Transaction Data'[day].[Date] < MIN ('Transaction Data'[day].[Date]) - 90))
 
VAR PriorCustomers = CALCULATETABLE(VALUES('Transaction Data'[customer_id]),
FILTER(ALL('Transaction Data'[day].[Date]),
'Transaction Data'[day].[Date]> MIN( 'Transaction Data'[day].[Date]) - 90 &&
'Transaction Data'[day].[Date] < MIN('Transaction Data'[day].[Date])))
 
RETURN COUNTROWS(EXCEPT(CurrentCustomers, PriorCustomers))
 _____________________________________________________________________________________________________________
Now, i want to also add the condition in bold:
Lost Customers - Rolling annual figure - number of transactional consumers who have purchased within last 12 months, but have not done so in over the previous 3 months. After 12 months of no purchases, the user is no longer considered to be lapsed.
 
How can i achieve this?
 
Also, i'm not able to see the grand total of the above calculation in the table.
JoelAndrews_0-1605277292154.png

 

1 ACCEPTED SOLUTION
Super User IV
Super User IV

@JoelAndrews , refer to my two blogs can help

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...
Customer Retention Part 2: Period over Period Retention :https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retenti...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

3 REPLIES 3
Super User IV
Super User IV

@JoelAndrews , refer to my two blogs can help

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...
Customer Retention Part 2: Period over Period Retention :https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retenti...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Thanks! 
I think this logic is much simpler to understand!

Hi  @JoelAndrews ,

 

Is your issue solved now?

If so,could you pls mark the reply as answered to close it?

Much appreciated.

 

Best Regards,
Kelly

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

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors