Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Audit overall score

Hello! My data looks like that. I Have different Audits, based on 2 areas and around 5 locations. Each location has it own questions. All questions are answered pass/fail. The questions for eac...
  • rsbin's avatar
    rsbin
    4 years ago

    Anonymous ,

    My recommendation is to create a new Calculated Table.  Call it "AuditSummary".

    First step is to Group By Audit ID and then create columns to calculate # of Questions asked, # of Passes and # of Fails.

     

    AuditSummary = SUMMARIZECOLUMNS( AuditDetail[Audit ID],
                                    "Questions", COUNTA( AuditDetail[Question] ),
                                    "Pass", CALCULATE( COUNTA(AuditDetail[Response] ), Filter(AuditDetail, AuditDetail[Response] = "Pass" )) + 0,
                                    "Fail", CALCULATE( COUNTA(AuditDetail[Response] ), Filter(AuditDetail, AuditDetail[Response] = "Fail" )) + 0)

     

    You should get a table looking like this.

    Audit IDQuestionsPassFail

    1 3 3 0
    2 3 2 1
    3 3 0 3

    Once you get a table looking like this, you should be able to carry on and get the data you need at the Audit level as opposed to the DetailedQuestion level.

    Using AuditID, create a relationship 1:many between AuditSummary and AuditDetail.

    Hope this gets you pointed in the right direction

    Good Luck and regards,