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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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