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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
3 REPLIES 3
amitchandak
Super User
Super User
Anonymous
Not applicable

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

Hi  @Anonymous ,

 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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