How to assign scores for each option in different questions (composite index)

I have two questions; one is single selection and another one is multiple selection.

Question 1: what type of structure it is?

  1. Temporary Structure (Assign score -1)
  2. Semi-Permanent Structure (Assign score -3)
  3. Permanent Structure (Assign score -5)

Question 2: What is the current practice of sludge management? (multiple selection)

  1. Pit sealed permanently when it gets full. (Assign score -1)
  2. Pit is connected to nearby Canal. (Assign score -2)
  3. Pit is connected to nearby River. (Assign score -3)
  4. Pit is connected to nearby ditch (Local Name: Ber) (Assign score -4)
  5. Pit cleaned by manually and sludge is dumped. (Assign score -5)
  6. Pit cleaned mechanically. (Assign score -6)
  7. Pit connected to nearby waterbody in the monsoon. (Assign score -7)

How can I calculate the total score in Kobo Template using expression?

Hi @minhazaunibd,

This post by Kal should help you:

2 Likes

Hi ! Thanks a lot for your cordial support. Its amazing.

2 Likes

@hakan_cetinkaya , is it possible to do multiple option and scoring in a single question ?

Hi @minhazaunibd, can you explain what do you mean by that?

If you can explain with a dummy question and some examples, community could understand it better.

1 Like

@minhazaunibd
Could you share the related part of your form (incl. the relevant choices), please? So, we could discuss further options for your score requirement.

2 Likes

Question 2: What is the current practice of sludge management? (multiple selection)

  • Pit sealed permanently when it gets full. (Assign score -1)
  • Pit is connected to nearby Canal. (Assign score -2)
  • Pit is connected to nearby River. (Assign score -3)
  • Pit is connected to nearby ditch (Local Name: Ber) (Assign score -4)
  • Pit cleaned by manually and sludge is dumped. (Assign score -5)
  • Pit cleaned mechanically. (Assign score -6)
  • Pit connected to nearby waterbody in the monsoon. (Assign score -7)

Like for this question, there is 7 option. If it is a multiple selection and I chose option 1, 2 and 5, total value will be 8 as per assigned scored. Is it possible to do?

Hi @minhazaunibd,

In your survey sheet:

type name label required calculation
start start
end end
select_multiple Q1 Q1 What is the current practice of sludge management? false
calculate C1 if(selected(${Q1}, β€˜1’),1,0)
calculate C2 if(selected(${Q1}, β€˜2’),2,0)
calculate C3 if(selected(${Q1}, β€˜3’),3,0)
calculate C4 if(selected(${Q1}, β€˜4’),4,0)
calculate C5 if(selected(${Q1}, β€˜5’),5,0)
calculate C6 if(selected(${Q1}, β€˜6’),6,0)
calculate C7 if(selected(${Q1}, β€˜7’),7,0)
calculate C_Total ${C1}+${C2}+${C3}+${C4}+${C5}+${C6}+${C7}
note N_1 Your total score is: ${C_Total}

And in your choices sheet:

list_name name label
Q1 1 Pit sealed permanently when it gets full.
Q1 2 Pit is connected to nearby Canal.
Q1 3 Pit is connected to nearby River.
Q1 4 Pit is connected to nearby ditch. (Local Name: Ber)
Q1 5 Pit cleaned by manually and sludge is dumped.
Q1 6 Pit cleaned mechanically.
Q1 7 Pit connected to nearby waterbody in the monsoon.

And this is the XLS file that you can use and test it by yourself:
Calculate From Multiple Choices.xlsx (10.4 KB)

1 Like

WOW! Its working perfectly. Thanks a lot @hakan_cetinkaya

2 Likes