Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Survey question scoring

Hello, 

I have a table containing different question with Yes/No/Not applicable answers. For each question there are points; for example if I answer to Q1 with Yes my score will be 8, if I answer No my score will be 0 else Not applicable it will be removed from the count. At the end i want to see the sum of all questions points for each users who completed the survey.

 

Thank you for your help.

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

    Since you did not give a specific table, I had to create my own table for testing according to your description, please point out if there are any problems.

    Please try below steps:

    1. below is my test table

    Table:

    2. create a measure and add it to table visual

    Total Score =
    VAR cur_name =
        SELECTEDVALUE ( 'Table'[Name] )
    VAR tmp =
        FILTER ( ALL ( 'Table' ), 'Table'[Name] = cur_name && 'Table'[Answer] = "Yes" )
    VAR ctn =
        COUNTROWS ( tmp )
    RETURN
        ctn * 8
    

    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.

2 Replies

  • Anonymous , Sum up all the questions with correct answers and multiple that by 8

     

    sumx(filter(Table, [Response] ="Yes"), [Question])*8


    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Since you did not give a specific table, I had to create my own table for testing according to your description, please point out if there are any problems.

    Please try below steps:

    1. below is my test table

    Table:

    2. create a measure and add it to table visual

    Total Score =
    VAR cur_name =
        SELECTEDVALUE ( 'Table'[Name] )
    VAR tmp =
        FILTER ( ALL ( 'Table' ), 'Table'[Name] = cur_name && 'Table'[Answer] = "Yes" )
    VAR ctn =
        COUNTROWS ( tmp )
    RETURN
        ctn * 8
    

    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.