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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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