Forum Discussion

Nadaaa-1's avatar
Nadaaa-1
New Member
2 years ago
Solved

Calculate SlA using power bI

Using power BI ..,,

If I have submit date and last modified date and need to calculate is the difference between them >72 hours then it's breached else within SLA 

, but I need to use only the workdays and please consider that the working hours are only 8 hours per day so I need to consider that 

How I can create it using power BI

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Nadaaa-1 ,

     

    You can use the NETWORKDAYS() function, which specifies the weekend rest days, and you can check the results as follows:

    Hour = var _d = NETWORKDAYS(MAX('Table'[Star]),MAX('Table'[End]),2)
    RETURN _d*8

     

    Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

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

2 Replies

  • I would try to create a calculated column "workday" first (in your Date table) and define which days are workdays. Mark your days like this : 

    WeekdayNumber = WEEKDAY ( 'Date'[Date] )


    Stg like this;

    xyz = IF ( 'Date'[WeekdayNumber] IN { 1, 7 },  0,  1 ) <-- it depends on which calender you use. Sunday = 1 or maybe  monday = 1?


    Your working hours are already defined?

    Pls try to apply this steps first. Just an idea

    Regards

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Nadaaa-1 ,

     

    You can use the NETWORKDAYS() function, which specifies the weekend rest days, and you can check the results as follows:

    Hour = var _d = NETWORKDAYS(MAX('Table'[Star]),MAX('Table'[End]),2)
    RETURN _d*8

     

    Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

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