How to get score on the selection of check box

@Grzesiek2010

1. What is the problem? Be very detailed.

I have a question in a questionnaire..in which respondent will select the household products.
i want to show the score of selecting products in next question...

Q1-Please select household products
Products | Code | Score
Product-1 | 1 | 5
Product-2 | 2 | 3
Product-3 | 3 | 6
Product-4 | 4 | 2
Product-5 | 5 | -3
Product-6 | 6 | 9

if respondent select (Product1+Product2+Product4) then total must be 10
if respondent select (Product1+Product5+Product6) then total must be 11
if respondent select (Product2+Product4+Product6) then total must be 14

how could i achieve this, thank you...

2. What app or server are you using and on what device and operating system? Include version numbers.

ODK Collect, ODK Aggregate, Xlsform

I would just add calculation like:

if(selected(${products}, 'product1'), 5, 0) + if(selected(${products}, 'product2'), 3, 0) + if(selected(${products}, 'product3'), 6, 0)+ if(selected(${products}, 'product4'), 2, 0) + if(selected(${products}, 'product5'), -3, 0) + if(selected(${products}, 'product6'), 9, 0)

score.xlsx (7.5 KB)