Forum Discussion

dheerendram's avatar
dheerendram
Regular Visitor
2 years ago
Solved

DAX FUNCTION HELP- Calculating SLA

Hi All,    I need help with calculating SLA% for below listed data using a dax function  Sample Data: Total Closed Ticket = 100 Closed 2 Days = 70 5 Days = 20 10 Days= 10 Tips: This is how I'...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi dheerendram ,

    Please try to create measure with below dax formula:

    3 Days =
    VAR tmp =
        FILTER ( ALL ( 'Table' ), [Status] = "Closed" )
    VAR tmp1 =
        FILTER ( ALL ( 'Table' ), [Ageing] <= "3 Days" )
    VAR _a =
        COUNTROWS ( tmp )
    VAR _b =
        COUNTROWS ( tmp1 )
    VAR _result =
        DIVIDE ( _b, _a )
    RETURN
        FORMAT ( _result, "percent" )
    
    4 Days =
    VAR tmp =
        FILTER ( ALL ( 'Table' ), [Status] = "Closed" )
    VAR tmp1 =
        FILTER ( ALL ( 'Table' ), [Ageing] <= "4 Days" )
    VAR _a =
        COUNTROWS ( tmp )
    VAR _b =
        COUNTROWS ( tmp1 )
    VAR _result =
        DIVIDE ( _b, _a )
    RETURN
        FORMAT ( _result, "percent" )
    

    Please refer the attached .pbix file.

     

    Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.