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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Help with building a measure

I have a measure currently labeled SLA. The data within that measure is either Violated or Non Violated. I need to come up with the % of Non Violated. My brain has since stopped working and I cannot figure out how to get this by building a new measure. Help? 

8 REPLIES 8
parry2k
Super User
Super User

@Anonymous 

Measure Count = COUNTROWS ( Table )

Violated % = 
DIVIDE ( 
   CALCULATE ( [Measure Count], Table[SLA] = "Violated" ),
   CALCULATE ( [Measure Count], ALLSELECTED () )
)

Non Violated % = 
DIVIDE ( 
   CALCULATE ( [Measure Count], Table[SLA] <> "Violated" ),
   CALCULATE ( [Measure Count], ALLSELECTED () )
)

SLA % = 
DIVIDE ( 
   [Measure Count],
   CALCULATE ( [Measure Count], ALLSELECTED () )
)

 

Here are the measures, the 4th one SLA % will work for both the cases if in the table you show SLA column, other measure are dedicated for each SLA type.



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.

parry2k
Super User
Super User

@Anonymous have you read my previous reply?



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.

parry2k
Super User
Super User

@Anonymous not sure what that is but it will be easier if you paste a sample data here with the expected output. I don't know what your calculation should be, just explain the calculation keeping DAX out of the picture.



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

Sample data below. I have a list of cases and then whether or not they were resolved within the SLA time. For the data below it would be 40% resolved within SLA. (2/5 = 40%) But when I try to do a simple divide it won't work, so I tried a sum but that didn't work either. 

CaseResolved within SLA
001Violated
002Non Violated
003Non Violated
004Non Violated
005Violated
Anonymous
Not applicable

Sorry, 60% would be within SLA, 3/5. I didn't read my own data.

Anonymous
Not applicable

I've also tried this: 

% Within SLA = DIVIDE((CALCULATE(total_tickets[Tickets Within SLA] = "non Violated"),(CALCULATE(total_tickets[Tickets Within SLA]][Tickets Within SLA] = "Violated")))
parry2k
Super User
Super User

@Anonymous with very little information you provided, try this:

 

Sales = SUM ( Table[Sales] ) --whatever your measure is I just created sales measure here

Percent No violated = 
DIVIDE ( 
   CALCULATE ( [Sales], Table[Column] = "Non Violated" ),
   [Sales]
)


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

I think maybe I did something wrong? 

% Within SLA = SUM((CALCULATE(total_tickets[Tickets Within SLA] = "non Violated")/(CALCULATE(total_tickets[Resolution time in calendar hours % difference from Count of Created date][Tickets Within SLA] = "Violated"))))
It says the syntax is wrong, so I'm guessing I did something really wrong. I'm sorry! 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors