cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
RunnerGabe Frequent Visitor
Frequent Visitor

Expressing aggregate compliance as a percentage

Hello all - thank you in advance for helping me to figure this out! 

 

I have a single column in my table expressing compliance, which is coded with either a 1 = compliant, or 0 = non-compliant. To have it look cleaner on the visuals, I copied that same column and replaced values with the definitions of compliant/non-compliant. 

Each record is a single entity (order), and I have data for 5 months. 

 

I want to be able to calculate the percentage of compliant orders to be displayed in my tooltip below in addition to what you already see. Cannot figure out how to do this .... tried measures, calculated columns etc. 

 

Thank you! 

Runnergabe

 

CPOE.JPG

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Expressing aggregate compliance as a percentage

@RunnerGabe try following measures, assuming your column name is Flag with values "Compliant" and "Non Compliant"

 

Compliant Orders % =
DIVIDE(
CALCULATE( COUNRTOWS( Table ), Table[Flag] = "Compliant" ),
CALCULATE( COUNRTOWS( Table ), ALL( Table[Flag] ) )

change formatting for this new measure to % in modelling tab, and drop this measure on tooltip.

 

 





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


Proud to be a Datanaut! Connect with me on Linkedin.
Feel free to email me with any of your BI needs.




 




RunnerGabe Frequent Visitor
Frequent Visitor

Re: Expressing aggregate compliance as a percentage

Thank you Parry! 

That works beautifully. Reading your post also helped me understand the structure of the measure; an area I am not very strong in at the moment. 

Runnergabe

4 REPLIES 4
Super User
Super User

Re: Expressing aggregate compliance as a percentage

@RunnerGabe try following measures, assuming your column name is Flag with values "Compliant" and "Non Compliant"

 

Compliant Orders % =
DIVIDE(
CALCULATE( COUNRTOWS( Table ), Table[Flag] = "Compliant" ),
CALCULATE( COUNRTOWS( Table ), ALL( Table[Flag] ) )

change formatting for this new measure to % in modelling tab, and drop this measure on tooltip.

 

 





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


Proud to be a Datanaut! Connect with me on Linkedin.
Feel free to email me with any of your BI needs.




 




RunnerGabe Frequent Visitor
Frequent Visitor

Re: Expressing aggregate compliance as a percentage

Thank you Parry! 

That works beautifully. Reading your post also helped me understand the structure of the measure; an area I am not very strong in at the moment. 

Runnergabe

Super User
Super User

Re: Expressing aggregate compliance as a percentage

@RunnerGabe Glad it worked and helpful. You end up marking your own reply as "solution" Smiley Very Happy

 

 





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


Proud to be a Datanaut! Connect with me on Linkedin.
Feel free to email me with any of your BI needs.




 




RunnerGabe Frequent Visitor
Frequent Visitor

Re: Expressing aggregate compliance as a percentage

Parry - oops! Corrected that.