Forum Discussion

barrymcguigan84's avatar
barrymcguigan84
Frequent Visitor
3 years ago
Solved

Count Quality Checks Up to Sign Off

Hi I work in a quality environment and we need to count the number of checks a caseworker has done up to an including the sign off, for each task.  In the eample in the table below, the correct answe...
  • v-yueyunzh-msft's avatar
    3 years ago

    Hi , barrymcguigan84 

    According to your description, you want to get the count od the [ID] when the caseworker's [Signed Off]="Yes" and before the date and the [Pass/Fail]="Pass".

    Here are the steps you can refer to :
    (1)My test data is the same as your provided.
    (2)We can create a measure like this:

    Measure = var _signedoff_id = CALCULATE( MAX('Table'[ID]) , 'Table'[Signed  Off] = "Yes")
    var _count = CALCULATE( COUNT('Table'[ID]) , 'Table'[ID]<=_signedoff_id , 'Table'[Pass/Fail]="Pass")
    return
    _count+0

     

    Then we can get this:

     

     

     

     

    If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

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