Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Im looking to create a measure to show a percentage of appointments that have either "ATTENDED EARLY" or "ATTENDED IN TARGET".
The field has the following appointment outcomes "ATTENDED EARLY", "ATTENDED IN TARGET", "ATTENDED LATE" and "APPOINTMENT NOT ATTENDED"
I have tried the following measure but it isnt working so im expecting im missing something.
Solved! Go to Solution.
Hi @Anonymous
Sorry, my bad NOT needs to go before column as in the example below.
No idea why you showing 0 as I can't see your data, can only guess, but you can:
Measure 9 =
DIVIDE(
CALCULATE(
COUNTROWS( 'Product' ),
'Product'[Color] IN { "Azure" }
),
CALCULATE(
COUNTROWS( 'Product' ),
NOT 'Product'[Color] IN { "Blue" }
)
)
Hi @Anonymous
Try this
Measure =
DIVIDE(
CALCULATE(
COUNTROWS( FACT_Appt ),
FACT_Appt[APPOINTMENT SUMMARY] IN { "APPOINTMENT ATTENDED EARLY", "APPOINTMENT ATTENDED IN TARGET"}
),
CALCULATE(
COUNTROWS( FACT_Appt ),
ALL( FACT_Appt )
)
)
Hi,
Thanks for your help.
I tried the measure but added some specific criteria as there are 2 values i want to exclude. I want to exclude "NO APPOINTMENT" and "FUTURE APPOINTMENT". When i try this and place the measure into a Visualisation it shows 0
Measure = DIVIDE( CALCULATE( COUNTROWS( FACT_Appt ), FACT_Appt[APPOINTMENT SUMMARY] IN { "APPOINTMENT ATTENDED EARLY", "APPOINTMENT ATTENDED IN TARGET"} ), CALCULATE( COUNTROWS( FACT_Appt ), ALL( FACT_Appt ) ) )
Any ideas on why this is 0
Thanks
Hi @Anonymous
You can exclude by using NOT IN{ "value1", "Value2" } ingstead of IN
Thanks
When i tried the NOT IN it returned a syntax error. Also when i tried your original measure that showed as a 0 aswell
This returned an error under the NOT IN function
Hi @Anonymous
Sorry, my bad NOT needs to go before column as in the example below.
No idea why you showing 0 as I can't see your data, can only guess, but you can:
Measure 9 =
DIVIDE(
CALCULATE(
COUNTROWS( 'Product' ),
'Product'[Color] IN { "Azure" }
),
CALCULATE(
COUNTROWS( 'Product' ),
NOT 'Product'[Color] IN { "Blue" }
)
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 70 | |
| 50 | |
| 42 | |
| 40 |