Calculating percentage out of range type questions

Hello Community.

I need help regarding the following. I’ve built a form that takes different range questions with parameter start=1 end=4 step=1. And I need to have a calculated field that takes the responses of those questions to calculate the percentage.

Question 1: 2
Question 2: 3
Question 3: 3
Question 4: 4

Total: 12 out of 16 possible points.

So the calculation field should display 75%

I’ve read some threads on the forum, and got to do this, but using integer type questions. Is it possible to do it with range type questions?

Thank you all!

Turns out it can be done the same exact way as using integer type questions.

@gecenab, you could do it as outlined in the image shared below:

In the survey tab of your XLSForm:

Data entry screen as seen in Enketo:

Reference XLSForm:

Percentage Calculation From Range.xls (29 KB)

1 Like


Now I have another issue you might be able to help. Turns out im trying the same outcome, this time using a selecto_one question type with likert apperance. Seems to work without a flaw.

Is there any where I can read about advacned topics or functions. For example what does the coalesce instruction do and others of that style?

Is there a instruction to show only 2 decimals for calculations?

@gecenab, you should be able to learn more about the same here and here.

1 Like