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! Learn more

Reply
Anonymous
Not applicable

Calculate Percentage

Hi All,

 

I'd love some help with calculating percentages for a booking system please. I want to calculate the percentage of appointments booked / room capacity, per room, per day, in order to show this as a visualisation.

 

I have 2 tables. One is a list of appointments. Each appointment has its own ID, date, time and assigned room.  The other table is a list of rooms, and total available appointments per day. The clinic data is not static. It often changes.

 

Example (Dummy data)

 

Table 1 - Clinic Data

 

RoomTotal Appointments Per Day
123
225
325
431
523

 

Table 2 - Schedule

 

RoomDateTimeAppointment ID
11 January09:00716181
11 January09:15716899
21 January09:05716435
32 January17:00716898

 

Thanks

 

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

That's @LittleBird.

Only based on the information you provide can you create the following measures:

Total appointments = SUM(Rooms[Total Appointments per day])

Ocupation = DISTINCTCOUNT(Schedule[Appointment ID])

Room availability = SUMX(Rooms,[Total appointments] - [Ocupation]) 

% availability = [Room availability] / [Total appointments]

Create a different measure to have the step layout now just use the ones you need in your visualization:

MFelix_0-1609426526297.png

Note that your information is very small if you need other requirements, share a sample file and the expected result.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

That's @LittleBird.

Only based on the information you provide can you create the following measures:

Total appointments = SUM(Rooms[Total Appointments per day])

Ocupation = DISTINCTCOUNT(Schedule[Appointment ID])

Room availability = SUMX(Rooms,[Total appointments] - [Ocupation]) 

% availability = [Room availability] / [Total appointments]

Create a different measure to have the step layout now just use the ones you need in your visualization:

MFelix_0-1609426526297.png

Note that your information is very small if you need other requirements, share a sample file and the expected result.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Thanks Miguel, this is just what I needed.

Happy new year.

littlemojopuppy
Community Champion
Community Champion

Where you're unclear is how long are appointments.  Are they a standard allotment of time or do they have individual start and end times?  Without knowing that this is impossible.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors