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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Percentage of appointments based on LASTDATE

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 nameTOTAL Appointment Date
74103



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.

Table1Table2Table2
Customer nameAppointment DateLast Appointment Date
A27/10/202229/10/2022
A28/10/202229/10/2022
A29/10/202229/10/2022
B30/10/202231/10/2022
B31/10/202231/10/2022
C01/11/202203/11/2022
C02/11/202203/11/2022
C03/11/202203/11/2022
D04/11/202204/11/2022
E05/11/202205/11/2022
F06/11/202206/11/2022
G07/11/202207/11/2022
H08/11/202208/11/2022
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You can do something like

Customers with appointments = COUNTROWS(VALUES('Appointments'[Customer]))

View solution in original post

10 REPLIES 10
tamerj1
Super User
Super User

Hi @Anonymous 

How are you planning to disply the result? In card visual? Can you present an example?

Anonymous
Not applicable

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. 

@Anonymous 

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?

Anonymous
Not applicable

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.

@Anonymous 

The solution provided by @johnt75 shall provide the correct results 

johnt75
Super User
Super User

You can do something like

Customers with appointments = COUNTROWS(VALUES('Appointments'[Customer]))
Anonymous
Not applicable

Apologies, it took some customising but this was the solution. Thank you for your help. 

Anonymous
Not applicable

Hi, 

 

This seems to be counting all rows with appointment values, rather than accounting for last appointment date only. 

Anonymous
Not applicable

Hello please try:

Calculate(distinctcount([customer name]),filter(table,[last date] = max([last date]))

Anonymous
Not applicable

Hi,

 

This is counting rows where there is no appointment date.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.