Name of the household member with least age which is also less than 5 years of age

Hi ODK Community,

I have a repeat group that is similar to:

I am trying to find out the name of the youngest household member that also
has age less than 5 outside the repeat loop (at household level).

I could display names of the household members with age less than 5 using
indexed-repeat and additional column in repeat group which stores the name
of the household member if it is less than 5 and null otherwise (displaying
all the end and only less than 5 shows up). But that is still not complete
solution.

It would be great if you could share some ideas on possible ways to
implement this.

Thanks,

Best,
Ayub