Forum Discussion

Delt-Joe's avatar
Delt-Joe
New Member
8 years ago
Solved

SLA calculation

Hello everyone, i am somwhat new to using power bi and DAX and would love some help.   Im trying to use Power bi to calculate the lenght of time a incident call has been open and, whilst taking int...
  • Greg_Deckler's avatar
    8 years ago

    You can use DATEDIFF to calculate the duration between your two event times. However, I would think you would need to wrap that in an IF statement to check that the start of the event was before whatever time the SLA timer stops and that its resolution was after the SLA timer started again if you want to subtract the 64 hours.

     

    SLADuration = var MyDuration = DATEDIFF([Start],[End],hour)
    
    RETURN
         IF([Start]<("SLA Stop Start") && ([End]>("SLA Stop End"),myDuration - 64, myDuration)

    Obviously some psuedo code in there, but that would be the general idea.