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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ashaikh
Helper III
Helper III

SLA calculation

Hello Guys,

 

I have a scenario here;

I need to calulate SLA percentage based on the Priority.

 

I have 3-columns:

  1. Has Met SLA - Says if it has met SLA
  2. Priority - Priority
  3. Ticket Id - Id of a ticket.

Now SLA is calulated as count of ticket for which priority a has met divided by total count of ticket for that priority

 

Example

 

For Priority: Low

Total Tickets: 100

Has Met SLA : 95

Has not met SLA: 5

SLA Percentage: 95%

 

I need help with DAX calculation how will i get the SLA percentage.

1 ACCEPTED SOLUTION
fhill
Resident Rockstar
Resident Rockstar

Tickets = COUNT(Table1[Ticket ID])

SLA%_2 = COUNT(Table1[SLA_Check - Text]) / CALCULATE(COUNT(Table1[SLA_Check - Text]), ALL(Table1[SLA_Check - Text]))

 

Capture.PNG




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




View solution in original post

9 REPLIES 9
fhill
Resident Rockstar
Resident Rockstar

Is your Has Met SLA YES/NO (text) or 0/1 (bit)?




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Its a text. Yes/No

fhill
Resident Rockstar
Resident Rockstar

Hope this helps...

 

Measures:

Tickets = COUNT(Table1[Ticket ID])  // ALL Tickets (In a Table, Power BI automatically groups by values (i.e. Priority)

 

Pass_SLA = CALCULATE(COUNT(Table1[SLA_Check - Text]), // Counts # of Tickets
                       Table1[SLA_Check - Text] = "YES") // Filtering for only "YES"

 

SLA% = [Pass_SLA] / CALCULATE(COUNT(Table1[SLA_Check - Text]), ALL(Table1[SLA_Check - Text]))

     // The ALL brings back in ALL values, but still maintains the Table Measures (grouping i.e. Priority)

 

Capture.PNG




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




will the percentage be same if I have SLA CHeck column in visual?

fhill
Resident Rockstar
Resident Rockstar

It doesn't look like it unless you filter to only include "YES' values...  Please mock up what you want the final table to look like...?

 

FOrrest




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Solution should be something like this

 

SLA Check Priority ticket count sla%
yes            High     90                90%
no             High     10                10%
yes            low       75                75%
no             low       25                25%

fhill
Resident Rockstar
Resident Rockstar

Tickets = COUNT(Table1[Ticket ID])

SLA%_2 = COUNT(Table1[SLA_Check - Text]) / CALCULATE(COUNT(Table1[SLA_Check - Text]), ALL(Table1[SLA_Check - Text]))

 

Capture.PNG




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Thanks.

 

That works.

fhill
Resident Rockstar
Resident Rockstar

Ignore my 0/1 column, I was building that direction until I got your reply. Forrest




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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
Top Kudoed Authors