Forum Discussion
Anonymous
6 years agoNot applicable
Measure that counts multiple values and shows as percentage
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 E...
- 6 years ago
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:
- format the measure to %
- create a data sample so I can apply the calculation to and test.
Measure 9 = DIVIDE( CALCULATE( COUNTROWS( 'Product' ), 'Product'[Color] IN { "Azure" } ), CALCULATE( COUNTROWS( 'Product' ), NOT 'Product'[Color] IN { "Blue" } ) )Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
Anonymous
6 years agoNot applicable
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
Measure = DIVIDE( CALCULATE( COUNTROWS( FACT_Appt ), FACT_Appt[APPOINTMENT SUMMARY] IN { "APPOINTMENT ATTENDED EARLY", "APPOINTMENT ATTENDED IN TARGET"} ), CALCULATE( COUNTROWS( FACT_Appt ), FACT_Appt[APPOINTMENT SUMMARY] NOT IN {"APPOINTMENT IN FUTURE","NO CURRENT APPT WINDOW"} ) )
Mariusz
Community Champion
6 years agoHi 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:
- format the measure to %
- create a data sample so I can apply the calculation to and test.
Measure 9 =
DIVIDE(
CALCULATE(
COUNTROWS( 'Product' ),
'Product'[Color] IN { "Azure" }
),
CALCULATE(
COUNTROWS( 'Product' ),
NOT 'Product'[Color] IN { "Blue" }
)
)
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.