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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mounad03
New Member

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
v-binbinyu-msft
Community Support
Community Support

Hi @mounad03 ,

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
v-binbinyu-msft
Community Support
Community Support

Hi @mounad03 ,

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

@mounad03 , 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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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