You can repeat composite groups not only on specific data fields but also on customized expressions. Using expressions you can, for example, repeat the composite group on the first part of a sample name. Let's say that a sequence contains the following samples:
Sample1_a
Sample1_b
Sample1_c
Sample2_a
Sample2_b
Sample2_c
Now let's say you want to repeat the composite group only two times, that is, for Sample1 and Sample2. The first part of the expression must therefore call the Split function, that divides the sample name in two parts, using the underscore as a delimiter:
=Split(Sample_Name, "_")
The result of this function is a list containing the following subentries:
Sample1; a
Sample1; b
Sample1; c
Sample2; a
Sample2; b
Sample2; c
The next part of the expression must be a Choose function that always returns the first element of a list:
Choose(1, [list] )
The list in this example is returned by the Split function:
=Choose(1, Split(Sample_Name, "_"))
This expression returns the following results:
Sample1
Sample1
Sample1
Sample2
Sample2
Sample2
If you use this expression to repeat the composite group, you will get only two composite groups, as there are only two distinct values.