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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mgaut341
Helper I
Helper I

PowerBi Measure for Appointment types

I am trying to create a measure looking at the no show rate for appointment types.

For my numerator I have the number of no shows appointments that were documented. I think I need to add the appointment types I am looking for- Vaccine, same day vaccine, and flu vaccine, as I only want the no show rate for these appointment types.

 

No Show Numerator =
CALCULATE(DISTINCTCOUNT('New Appointment_Fact'[apptid]), 'New Appointment_Fact'[apptslotstatus]="x - Cancelled")
 

The denominator is where I run into problems. I want to create a denominator that counts all the appointment slot statuses, however, I only want it to count for the appointment types that are 'vaccine', 'flu vaccine', and 'same day vaccine'. I have tried using the following formula but the results are not accurate as it takes in all appointment types and not only the three desired. How should I change my denominator formula?

 

CALCULATE(DISTINCTCOUNT('New Appointment_Fact'[prnt apptid]), 'New Appointment_Fact'[appttype]="Vaccine", 'New Appointment_Fact'[appttype]="Same Day Vaccine", 'New Appointment_Fact'[apptslotstatus]="4 - Charge Entered", 'New Appointment_Fact'[apptslotstatus]= "f - Filled", 'New Appointment_Fact'[apptslotstatus]= "2 - Checked In", 'New Appointment_Fact'[apptslotstatus]= "3 - Checked Out" || 'New Appointment_Fact'[apptslotstatus] = "x - Cancelled") + CALCULATE(DISTINCTCOUNT('New Appointment_Fact'[apptid]), 'New Appointment_Fact'[apptslotstatus] = "o - Open Slot")

2 REPLIES 2
mgaut341
Helper I
Helper I

Thank you, that worked!! 

Do you believe I need to change my numerator to only include the appointment types of interest?

amitchandak
Super User
Super User

@mgaut341 , Try like

 

CALCULATE(DISTINCTCOUNT('New Appointment_Fact'[prnt apptid]), filter('New Appointment_Fact', 'New Appointment_Fact'[appttype] in {"Vaccine",,"Same Day Vaccine"} && 'New Appointment_Fact'[apptslotstatus] in {"4 - Charge Entered", "f - Filled", "2 - Checked In", "3 - Checked Out" , "x - Cancelled"})) + CALCULATE(DISTINCTCOUNT('New Appointment_Fact'[apptid]), filter('New Appointment_Fact','New Appointment_Fact'[apptslotstatus] = "o - Open Slot"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.