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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Fangyi8
Frequent Visitor

Client Classification

Hi guys,

please I need your help with classifying customers according to the following criteria,

New client - made a one purchase in the month of December 2023,

Active client - made a purchase this month and has made 2 or more purchases in the last 60 days,

Passive client - made a purchase one purchase this month and 1 purchase in the last 60 days,

Returning client - made a purchase this month but hasn't made a purchase in the last 60 days.

Lost client - Hasn't made any purchase in the last 60 days.

 

I am attaching sample data but if you want to see the whole thing, I can send it.

Deal StageDeal idDate of the dealName of clients
Payment received6202.04.2022ООО "Аделит"
Payment received17012.09.2022ООО "Аделит"
Payment received23817.12.2022ООО "Аделит"
Payment received25907.01.2023ООО "Аделит"

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Fangyi8 

 

You can try the following methods.
Sample data:

vzhangti_0-1670209852565.png

Classification = 
Var _currentmonth=CALCULATE(COUNT('Table'[Date of the deal]),FILTER('Table',MONTH([Date of the deal])=MONTH(TODAY())
                                                                            &&[Name of clients]=EARLIER('Table'[Name of clients])))
Var _newclient=CALCULATE(COUNT('Table'[Date of the deal]),FILTER('Table',[Name of clients]=EARLIER('Table'[Name of clients])))
Var _last60day=CALCULATE(COUNT('Table'[Date of the deal]),FILTER('Table',[Date of the deal]>=TODAY()-60
                                                                         &&[Date of the deal]<MAX('Table'[Date of the deal])
                                                                        &&[Name of clients]=EARLIER('Table'[Name of clients])))
Return
SWITCH(TRUE(),
_currentmonth=1&&_newclient=1,"New client",
_currentmonth>=1&&_last60day>=2,"Active client",
_currentmonth=1&&_last60day=1,"Passive client",
_currentmonth>=1&&_last60day=BLANK(),"Returning client",
_last60day=BLANK(),"Lost client")

vzhangti_1-1670210030714.png

Please check the attachment.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @Fangyi8 

 

You can try the following methods.
Sample data:

vzhangti_0-1670209852565.png

Classification = 
Var _currentmonth=CALCULATE(COUNT('Table'[Date of the deal]),FILTER('Table',MONTH([Date of the deal])=MONTH(TODAY())
                                                                            &&[Name of clients]=EARLIER('Table'[Name of clients])))
Var _newclient=CALCULATE(COUNT('Table'[Date of the deal]),FILTER('Table',[Name of clients]=EARLIER('Table'[Name of clients])))
Var _last60day=CALCULATE(COUNT('Table'[Date of the deal]),FILTER('Table',[Date of the deal]>=TODAY()-60
                                                                         &&[Date of the deal]<MAX('Table'[Date of the deal])
                                                                        &&[Name of clients]=EARLIER('Table'[Name of clients])))
Return
SWITCH(TRUE(),
_currentmonth=1&&_newclient=1,"New client",
_currentmonth>=1&&_last60day>=2,"Active client",
_currentmonth=1&&_last60day=1,"Passive client",
_currentmonth>=1&&_last60day=BLANK(),"Returning client",
_last60day=BLANK(),"Lost client")

vzhangti_1-1670210030714.png

Please check the attachment.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.