Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I'm trying to calculate the percentage of customers who have made an appointment, against the total number of customers.
Unfortunately, as customers can make multiple appointments, the current total number of appointments exceeds the total number of customers.
TOTAL Customer name | TOTAL Appointment Date |
74 | 103 |
Is there a calculation I can do to create a measure based on a COUNT of LASTDATE without including the duplicate entries?
I've attached sample data below.
Table1 | Table2 | Table2 |
Customer name | Appointment Date | Last Appointment Date |
A | 27/10/2022 | 29/10/2022 |
A | 28/10/2022 | 29/10/2022 |
A | 29/10/2022 | 29/10/2022 |
B | 30/10/2022 | 31/10/2022 |
B | 31/10/2022 | 31/10/2022 |
C | 01/11/2022 | 03/11/2022 |
C | 02/11/2022 | 03/11/2022 |
C | 03/11/2022 | 03/11/2022 |
D | 04/11/2022 | 04/11/2022 |
E | 05/11/2022 | 05/11/2022 |
F | 06/11/2022 | 06/11/2022 |
G | 07/11/2022 | 07/11/2022 |
H | 08/11/2022 | 08/11/2022 |
Solved! Go to Solution.
You can do something like
Customers with appointments = COUNTROWS(VALUES('Appointments'[Customer]))
Hi @sherwood
How are you planning to disply the result? In card visual? Can you present an example?
Hi,
I'd like to add a column that indicates if a Customer has made and Appointment, then show the Total as a percentage in a visual.
Add a column to what? To show the percentage in which type of visual? Can provide the screenshot? The Last Appointment Date is Column or a measure?
Sorry, I was confusing two possible solutions.
I need to get the total count of all Customers who have made an Appointment. I want to add the percentage to a table or card.
You can do something like
Customers with appointments = COUNTROWS(VALUES('Appointments'[Customer]))
Apologies, it took some customising but this was the solution. Thank you for your help.
Hi,
This seems to be counting all rows with appointment values, rather than accounting for last appointment date only.
Hello please try:
Calculate(distinctcount([customer name]),filter(table,[last date] = max([last date]))
Hi,
This is counting rows where there is no appointment date.
User | Count |
---|---|
53 | |
35 | |
20 | |
15 | |
14 |
User | Count |
---|---|
94 | |
76 | |
36 | |
22 | |
18 |