Sum of Questionnaire Scores Based on a Domain Table

herman925

New Member
Joined
Apr 9, 2017
Messages
24
I have created a questionnaire that consists of around 100 questions. These items are separated into 6 domains where. For the sake of easier understanding, let's just call them Domain 1 - 6.

I have them typed in one specific table called "Correspondence", with format like below:

Question No.
Domain
1
A
2
C
3
A
4
B
5
A
6
C

<tbody>
</tbody>



I used Google Form to generate a spreadsheet of RAW data of respondents, where it will help me mark the RAW Scores, for each item on a separate column:

(An example)
Submission ID
Question 1
Question 2
Question 3
Question 4
Question 5
Question 6
Participant 1
2
3
5
1
2
4
Participant 2
5
4
5
3
5
1
Participant 3
1
1
1
2
2
2

<tbody>
</tbody>



The next thing I need to do is generate another table that sums up the Domain totals for each participant. So from the example above, I need to sum 1,3,5 as Domain A, 4 as Domain B and 2 & 6 as Domain C:

(An example)
Domain A
Domain B
Domain C
Total score for Participant 1
9
1
7

<tbody>
</tbody>


The hardest thing is to find a proper method to kick start this process. Can anyone point me in the right direction? Either formulas or VBAs would be fine too. Thanks!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
something like this or I misunderstood ?

Submission IDABC
Participant 1
9​
4​
8​
Participant 2
9​
4​
8​
Participant 3
9​
4​
8​
 
Upvote 0
ignore my previous post#2

here is with PowerQuery:

Submission IDABC
Participant 1
9​
1​
7​
Participant 2
15​
3​
5​
Participant 3
4​
2​
3​

Code:
[SIZE=1]let
    Source = Table.NestedJoin(Table2,{"Attribute"},Table1,{"Question No."},"Table1",JoinKind.LeftOuter),
    #"Expanded Table1" = Table.ExpandTableColumn(Source, "Table1", {"Domain"}, {"Domain"}),
    #"Grouped Rows" = Table.Group(#"Expanded Table1", {"Submission ID", "Domain"}, {{"Value", each List.Sum([Value]), type number}}),
    #"Sorted Rows" = Table.Sort(#"Grouped Rows",{{"Domain", Order.Ascending}}),
    #"Pivoted Column" = Table.Pivot(#"Sorted Rows", List.Distinct(#"Sorted Rows"[Domain]), "Domain", "Value", List.Sum)
in
    #"Pivoted Column"[/SIZE]

but before execute M-code above you need to prepare both tables of source

Question No.DomainSubmission IDAttributeValue
Question 1AParticipant 1Question 1
2​
Question 2CParticipant 1Question 2
3​
Question 3AParticipant 1Question 3
5​
Question 4BParticipant 1Question 4
1​
Question 5AParticipant 1Question 5
2​
Question 6CParticipant 1Question 6
4​
Participant 2Question 1
5​
Participant 2Question 2
4​
Participant 2Question 3
5​
Participant 2Question 4
3​
Participant 2Question 5
5​
Participant 2Question 6
1​
Participant 3Question 1
1​
Participant 3Question 2
1​
Participant 3Question 3
1​
Participant 3Question 4
2​
Participant 3Question 5
2​
Participant 3Question 6
2​
 
Last edited:
Upvote 0
The RAW data will be constantly modified and not maintained by me and thus I am not sure if I could change the format of the RAW table to the one you specified.....but appreciate the thought!
 
Last edited by a moderator:
Upvote 0
you can change data in source table as long as format and type of data will be the same in appropriate places

changes was maded in PowerQuery - your source table is still the same as in your post
 
Upvote 0

Forum statistics

Threads
1,214,431
Messages
6,119,462
Members
448,899
Latest member
maplemeadows

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top