Calculations with skip and comparison

Hi,

I am working on a form such that we have different people living in a form of shelter. Let’s say Shelter type A, B, C, D, E, F. These shelters are not all present in all the locations hence, I have a checkbox with a question as thus,

Total number of families in your location
Select the form of shelter in your Location.
If A, C, E and F are selected, a new question for each of the selection will be displayed as thus

How many families are living in A type of Shelter
How many families are living in C type of Shelter
How many families are living in E type of Shelter
How many families are living in F type of Shelter

So here is what I want to do, I want a situation whereby only the ones selected will be cumulated using calculate. Due to the randomness of the responses, I am finding it difficult to achieve.

In the end, I am hoping to compare the cumulative with the Total families living in the location as initially provided.

Hi @ejiga,

Welcome to the community! You could do the same as outlined in the image shown below:

In the survey tab of your xlsform:

In the choices tab of your xlsform:

Image 2

Data entry screen as seen in Enketo: (wrong entry)

Data entry screen as seen in Enketo: (correct entry)

Reference xlsform:

Selected Sum.xlsx (11.0 KB)

Have a great day!

1 Like

Hi @Kal_Lam,

This was very useful and I have been able to sort things out according.

I really appreciate your efforts and the swiftness in response.

Ejiga

1 Like