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