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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ROG
Responsive Resident
Responsive Resident

Returning customers based on the ID column

Hi guys,

 

How can I calculate the number of returning custmers based on the ID column?

If an ID appears more than once, it means they're return customer.

 

Thanks!!

1 ACCEPTED SOLUTION

Sorry for this try using this it is working attaching PBIX file

 

Returning Customers = COUNTX(FILTER(SUMMARIZE('Table', 'Table'[CRM ID]), CALCULATE(COUNT('Table'[CRM ID])) > 1), 'Table'[CRM ID])





Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

4 REPLIES 4
rajendraongole1
Super User
Super User

Hi @ROG - create a count of ids using calculated columns as below:

 

IDCount = COUNTX(FILTER('TableID', 'TableID'[ID] = EARLIER('TableID'[ID])), 'TableID'[ID])

 

create a measure to count the number of returning customers -IDs appearing more than once

Measure:

 

ReturningCustomers =
CALCULATE(
DISTINCTCOUNT('YourTable'[ID]),
'YourTable'[IDCount] > 1
)

Hope it works.

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





bhanu_gautam
Super User
Super User

@ROG , You can achieve this using measure

 

returning_customers = COUNTROWS(FILTER(SUMMARIZE('Table', 'Table'[ID]), CALCULATE(DISTINCTCOUNT('Table'[ID])) > 1))




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






ROG
Responsive Resident
Responsive Resident

Thanks @bhanu_gautam 

Unfortunately, it's giving me blank. Any advice please?

 

Returning Users = COUNTROWS(FILTER(SUMMARIZE('Smart FAQ''s', 'Smart FAQ''s'[crm_id]), CALCULATE(DISTINCTCOUNT('Smart FAQ''s'[crm_id])) > 1))

% Returning Users = [Returning Users]/[No of users]
ROG_0-1718969154182.png

 






Sorry for this try using this it is working attaching PBIX file

 

Returning Customers = COUNTX(FILTER(SUMMARIZE('Table', 'Table'[CRM ID]), CALCULATE(COUNT('Table'[CRM ID])) > 1), 'Table'[CRM ID])





Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.