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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Determine if Within SLA or Out?

Hi Kind People,

 

Need your help.

I'm having a hard time as well in getting the SLA if Within and if Out of SLA.

 

Requirement:

1. if TAT is equal or less than SLA, should be Tagged as "Within SLA"

2. if TAT is not equal or greater than SLA, should be tagged as "Out of SLA" and if TAT is Blank, should be tagged as well as "Out of SLA"

 

Nelzkie09_0-1675424489233.png

 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Anonymous 

 

Please try:

Within or Out = 
var _a = HOUR([TAT])+MINUTE([TAT])/60+SECOND([TAT])/3600
return IF(OR(ISBLANK([TAT]),_a>[SLA]),"Out of SLA","Within SLA")

Final output:

vjianbolimsft_0-1675662742961.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @Anonymous 

 

Please try:

Within or Out = 
var _a = HOUR([TAT])+MINUTE([TAT])/60+SECOND([TAT])/3600
return IF(OR(ISBLANK([TAT]),_a>[SLA]),"Out of SLA","Within SLA")

Final output:

vjianbolimsft_0-1675662742961.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Assuming TAT's data type is time, a new column

if( hour([TAT])  >= [SLA], "Within" , "Out")

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors