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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
parry2k
Super User
Super User

@Anonymous 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.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

Anonymous
Not applicable

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

View solution in original post

4 REPLIES 4
parry2k
Super User
Super User

@Anonymous 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.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

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

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

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Parry - oops! Corrected that. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.