The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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! |
|
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! | |
@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! |
|
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |