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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register 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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.