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
Victor_sp
Frequent Visitor

Lost Customers details

Hi Team,

we have achieved lost customers data as per selected date range however we are facing issue with future transactions in lost customer data from selected date. Could any one help us to sort out the issue.
Eg:
We have data from 01-Jan-2020  to 14-Feb-2023 in table, selected date range is "01-Jan-2020 to 31-Dec-2022" in this case we have to restrict customers who have done transaction after max selected date and we need to show customers only who have not purchased in selected period and they have purchased before slected Min date.

We have tried
1.sales amount in selected period == blank then Lost customers ----- it is working but we are getting post selected date customers also.

2. (sales amount in selected period == blank ) && max(Txn date) <= max(dim date [date]) --but still we are getting same.

3. (sales amount in selected period == blank ) && (max(Txn date) <= max(dim date [date])) && (sales amount before selected period)>0 ----- we are facing blank.

 we have three tables = customer table , Transaction table and dim_date table 

Thank you for your help.

1 REPLY 1
wdx223_Daniel
Super User
Super User

=COUNTROWS(FILTER(Customers,CALCULATE(SUM(Sales[Amount]),Dates[Date]<MIN(Dates[Date]))>0&&CALCULATE(SUM(Sales[Amount]))=0))

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