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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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!!
Solved! Go to Solution.
Sorry for this try using this it is working attaching PBIX file
Proud to be a Super User! |
|
@ROG , You can achieve this using measure
returning_customers = COUNTROWS(FILTER(SUMMARIZE('Table', 'Table'[ID]), CALCULATE(DISTINCTCOUNT('Table'[ID])) > 1))
Proud to be a Super User! |
|
Thanks @bhanu_gautam
Unfortunately, it's giving me blank. Any advice please?
Sorry for this try using this it is working attaching PBIX file
Proud to be a 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!!
Proud to be a Super User! | |