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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
mgaut341
Helper II
Helper II

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 II
Helper II

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.