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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
gpauli200
Frequent Visitor

SLA Reporting Help - Calculated Column Formula?

Hello,

I am having trouble figuring out how to report on SLA targets. I’ve been reading other user questions here, but I am having trouble applying their solutions to my data.

 

I have a table with ticket number, priority, create date and resolved date. I need to report on whether or not tickets met their SLA by priority. For example, critical priority tickets need to be resolved within 8 hours of creation, high priority tickets needs to be resolved within 16 hours, and medium priority tickets needs to be resolved within 72 hours.

 

I am not sure how to add this as a calculated column. Is that the right approach? If so, can I get some help with the formula?

 

I greatly appreciate any advice or help!! Thank you!

Table.PNG

1 ACCEPTED SOLUTION
Barnee
Advocate IV
Advocate IV

Hi,

as far as I see this problem, you should use DATEDIFF function to calculate difference between dates. In it"s 3rd parameter you can set the difference to a hour based format. 
After that you can solve this with a simple IF and AND function combo. 

I bet It can be solved less complicated but here is my calculated column for that for that:

SLA = IF(AND(Table1[Priority]="Medium",DATEDIFF(Table1[Create_Date],Table1[Resolved Date],HOUR)<=16),"In SLA",IF(AND(Table1[Priority]="Low",DATEDIFF(Table1[Create_Date],Table1[Resolved Date],HOUR)<=72),"In SLA",IF(AND(Table1[Priority]="High",DATEDIFF(Table1[Create_Date],Table1[Resolved Date],HOUR)<=8),"In SLA","Out SLA")))

and here is the table with the resoult:
datediff.PNG

Hope I could help.

Barna

View solution in original post

1 REPLY 1
Barnee
Advocate IV
Advocate IV

Hi,

as far as I see this problem, you should use DATEDIFF function to calculate difference between dates. In it"s 3rd parameter you can set the difference to a hour based format. 
After that you can solve this with a simple IF and AND function combo. 

I bet It can be solved less complicated but here is my calculated column for that for that:

SLA = IF(AND(Table1[Priority]="Medium",DATEDIFF(Table1[Create_Date],Table1[Resolved Date],HOUR)<=16),"In SLA",IF(AND(Table1[Priority]="Low",DATEDIFF(Table1[Create_Date],Table1[Resolved Date],HOUR)<=72),"In SLA",IF(AND(Table1[Priority]="High",DATEDIFF(Table1[Create_Date],Table1[Resolved Date],HOUR)<=8),"In SLA","Out SLA")))

and here is the table with the resoult:
datediff.PNG

Hope I could help.

Barna

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.