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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
carlosmorales
Frequent Visitor

Customer analysis

Hello, happy new year everyone.

I once again appear before you requesting your support.

I keep learning from Power Bi. however, I consider that some issues are still outside my capabilities, such as the following:

from the attached database, I should find the following:

1) Customers: the number of customers who made a purchase within that period of time.

2) New customers: the number of customers who made their first purchase within that time period.

3) Returning customers: the number of customers who have already bought something in the past and who return in that period of time.

4) Lost customers: the number of customers whose last purchase occurred at least 2 months before the start of the current period.

5) Recovered Customers: The number of customers who were considered lost in a previous time period and then made a purchase 

in the current period.

and present a graph like the following one for each class or type of client, filtered by category or brand.

Customer analysis.jpghttps://drive.google.com/file/d/1jJCsBJd9zMH2KDmwzaZdYvRq48ZWt0p_/view?usp=sharing 

 

 

Thank you in advance for your time, and for sharing your knowledge.

3 REPLIES 3
carlosmorales
Frequent Visitor

Hello,
Thank you very much for answering 

@MattAllington  and @amitchandak 

Although the answers are well structured, I have a doubt; in my data there is the field: possible days of next purchase.

From the date of purchase + possible days of next purchase, I must classify the clients and their status (new, lost, etc.)

amitchandak
Super User
Super User

@carlosmorales , refer to my two blogs that cover this topic. Hope that 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...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
MattAllington
Community Champion
Community Champion

It is all documented here https://www.daxpatterns.com/new-and-returning-customers/



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.