Forum Discussion

Matic20's avatar
Matic20
Frequent Visitor
6 years ago
Solved

Count Specific Rows in a measure

Hello Team
I need some help here 
Am trying to Count the 1s and Os in the SLA_Achieved

Please note that SLA_Achieved is a measure resulting from Comparing Achived_SLA and SLA 

SLA_Achieved = IF([Achived_SLA] <= [SLA],1, 0)
 
My End goal is to get the SLA per person which will be (Sum of 1s / total number of tickets)*100

 

  • Matic20 try this measure

     

    Counts of 1 = 
    COUNTX ( VALUES ( Table[Ticket_Id] ), IF ( [SLA_Achieved], 1 ) )
    
    Counts of 0 = 
    COUNTX ( VALUES ( Table[Ticket_Id] ), IF ( NOT [SLA_Achieved], 1 ) )
    

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

1 Reply

  • Matic20 try this measure

     

    Counts of 1 = 
    COUNTX ( VALUES ( Table[Ticket_Id] ), IF ( [SLA_Achieved], 1 ) )
    
    Counts of 0 = 
    COUNTX ( VALUES ( Table[Ticket_Id] ), IF ( NOT [SLA_Achieved], 1 ) )
    

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.