Referencing repeat group iterations in subsequent questions for ease of analyses

Hello there,
I need help in creating a repeat group with iteration where each iteration should be identifiable for analysis. For example, a farmer can grow multiple crops in a year and I would like to collect data on each crop (like amount of fertilizer used, pesticide used, sale quantity and amount received) from each farmer. I would like to have a multiple choice question for crops grown by a farmer and then use each of the crop selected in a repeat group (identifiable in the question) for crop specific variables mentioned above. After collection of data, the specific crop and specific variable should be somehow identifiable for the analysis. An option for this is to code the group questions multiple times but I would like to know an efficient way (if it is there).

Welcome to the community @shaileshnagar! You could do the same as outlined in the image shared below:

In the survey tab of your xlsform:

In the choices tab of your xlsform:

Image 102

Data entry screen as seen in Enketo:

Reference xlsform:

Household (Count) Repeat Example.xlsx (27.4 KB)

2 Likes

Hello,
Here some more repeat groups,Repeating a group of questions in the questionnaire
You will find more with search option in the community forum.

1 Like

Thanks. This does the work for me for data collection. However, the data collected for different options may not be identifiable (in the data download sheet) by that. For example, if in multiple selection question, I select 1st and 3rd option and then in repeat group collect information on these options, how will I identify whether data collected in roster pertains to 1st and 3rd and not 2nd option. Any way to do that? Greatly appreciate your help.

1 Like

In the example in Kal_Lam’s screenshot there is a calculation which records which crop each round of the repeat group is associated with (C1). The results of that calculation will be displayed in the data export so from the analysis side it works well. In the example this calculation is then referenced in the question labels (C2, C3, C4) so that the enumerator can also follow the flow of the questions easily.

You could of course include multiple calculations if there are multiple pieces of information from outside the repeat group which you want to include in the repeat group tab of your data export for convenient analysis but that depends on the previous questions in your specific form.

1 Like

Hi @shaileshnagar,

Have you made a dummy entry and then download your data to see how it looks like. It shouldn’t be an issue to manage it. FYI, i have made a dummy entry choosing Crop 1 and Crop 3 from a single household. The data would look as follows:

The main data would be like:

The roster data would be like:

So if you look at the roster under C1 you should see the crop selected for a select_multiple question whose data is being repeated.

Maybe if you make some dummy entries and then download the dataset, you should be familiar with the dataset.

1 Like

I recommand using the fonction indexed-repeat(${Q2},${roster},n) to extract the specific response to a question according to a specific iteration n of the repeating group roster
And inside the repeating group you can get the repeating iteration number with position(…)

Have fun :wink:

1 Like

@Kal_Lam
Thank you for sharing this example.
Please note that I am working on a project similar to this one, and I noticed that if the data entry change the answer of Q1, after filling the data in the repeated groups (ex: selecting Crop1 and Crop 5, start answering the questions in the repeat group, then selecting Crop 4), the answers that was filled in the repeated groups for Crop5 will be considered for Crop4, is there a way to address this?

You can find our related posting (2019) here:

1 Like

Thank you @wroos
So there is no solution for this so far. Right?