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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
fazza1991
Helper II
Helper II

Customers present in current month and same period last year

I am looking to indentify customers who were present in a month and also present in the same month previous year.

 

Example below 

 

Should be present column just to illustrate. That eg. client 3001 was not present in Aug-22 as no purchase value but client 101001, 115001 are present in both Aug-22 and Aug-23.

 

cl CodeAug-22Aug-23Should be present
3001044.32n
10100142.9490.68y
115001298685y
12192118.240n
12381830.528y
1238191204.6694.9y
20200467.10n
202008277.28282.14y
24700816.80n
2470096.10n
247012214.6196.75y
288001786.54633.95y
360008160.240n
36000981.440n
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@fazza1991 , Assume you have measure sales and you are using date table

 

then

 

Year behind Sales = CALCULATE([Sales],dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE([Sales],SAMEPERIODLASTYEAR('Date'[Date]))

 

Countx(values(Customer[Customer]) ,

If(not(isblank([Sales])) && not(isblank([Year behind Sales])) , [Customer], blank())

 

same a customer Retention

https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...

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

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @fazza1991 

 

What does your source data look like? Is it possible to give an example? Is the date a column name or a column value?

 

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.

amitchandak
Super User
Super User

@fazza1991 , Assume you have measure sales and you are using date table

 

then

 

Year behind Sales = CALCULATE([Sales],dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE([Sales],SAMEPERIODLASTYEAR('Date'[Date]))

 

Countx(values(Customer[Customer]) ,

If(not(isblank([Sales])) && not(isblank([Year behind Sales])) , [Customer], blank())

 

same a customer Retention

https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...

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

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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