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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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