Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Average per ID

Hi all, I have a table which contains mulitple rows with same id's, each row has a text with FAILED or PASSED. For example: ID  Result 1 FAILED 2 FAILED 1 PASSED 2 FAILED 1 ...
  • tackytechtom's avatar
    3 years ago

    Hi Anonymous ,

     

    How do you get to 75% passed for ID = 1? 🙂

     

    Here maybe something that could help you:

     

    Here the DAX code for the Measure above

    AverageMeasurePassed = 
    DIVIDE ( 
        CALCULATE ( 
            COUNTROWS ( 'Table' ),
            'Table'[Result] = "PASSED"
        ),
        CALCULATE ( 
            COUNTROWS ( 'Table' ),
            REMOVEFILTERS ( 'Table'[Result] )
        )
    ) + 0

     

    Let me know if this helps 🙂

     

    /Tom
    https://www.tackytech.blog/
    https://www.instagram.com/tackytechtom/