Max integer from repeat group

Hello all,
I hope you all are doing good,

I have tried many times but couldn’t do this.

I have an integer question (Question 2) inside a repeated group. I know how many times the repeated group will be repeated (repeat_count) is based to an answer of Questio1.

Let’s say that the number of repeated group will be 6, and the Question 2 (which is inside the repeat) has the follow answers:
6 / 5 / 11 / 3 / 15 / 1

so my question is:

Is there a way to know the max value (input) had be entered to the Question 2 (from all over the 6 repeats) ? (which is 15 in this situation)

Best

Welcome @musto ,
Please see the attached image

1 Like

Thank you so much dear @MohammedTaleb .

I will try ASAP.

Can I add another condition?

I will add Question3 as select one yes/no and this question will be inside the repetition.

How can I say (outside the repetition),

Find the Max value of Question 2 with (Yes) response to Question 3, if the max value repeat has answer (no) to Question 3, then find the the next Max value with answer Yes to Q3 if not then keep looking till you find max with yes and once you find the max value with Yes response give the repeat index :slight_smile:

Sorry for such confusion if there is any. Your help much appreciated.

1 Like

:heart_eyes: :+1:

1 Like

Thank you again, but how I can identify the index number of that max value repetition?

1 Like

Excuse me @musto I am sorry
I didn’t notice that you also wanted the index of maximum value

The attached file contains the required

first solution.xlsx (10.7 KB)
best solution.xlsx (10.8 KB)

1 Like

Dear no need to be sorry at all, YOU ROCK!

Here is the issue and the solution for the community, credit to @MohammedTaleb with namy thanks.

The issue:
We need to know the eldest child’s age and gender from a repeated group, so we can force the entries in later group to be exactly the same as the entries in the repition.

The count of the repition based on an integer answer.
The age question inside the repition is >= 3 and <= 22.
The gender select one only male and female
There is a question if there is a disability or not.

The later group of questions is asking for the eldest child in the 5-17 age segmentation with no disability.

For quality control, we have to extract the eldest child age and gender if there is no disability. If the eldest child has a disability then we move to the next eldest one.

The solution:

In the file attached after I did a slight change to it from the orginal file solved by @MohammedTaleb in this post:

Thank you Mohammed and thanks to the community!

best solution.xlsx (11.0 KB)

2 Likes