Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

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.

1 ACCEPTED SOLUTION
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:

vbinbinyumsft_0-1662431204614.png

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

vbinbinyumsft_1-1662431290474.png

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.

View solution in original post

2 REPLIES 2
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:

vbinbinyumsft_0-1662431204614.png

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

vbinbinyumsft_1-1662431290474.png

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.

amitchandak
Super User
Super User

@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.

 

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors