Grouping rows by different columns

Hello. How can I group specific rows in the datatable where specifically the columns col0,col1,col2 and col3 have the same values (the value can be random so I can not hardcode it) and filter the rest, regardless of col4 or col5. If one of the value of columns from (col0,col1,col2 and col3) is different it should be kept out of the grouping.

col0 col1 col2 col3 col4 col 5..
 1    1    1    1    3     4
 **1    1    1    2**    4    5
 1    1    1    3     6    7
 1    2    1    1     8    9
 **1    1    1    2**     9    1
 2    3    4    5    2    3
 2    3    4    9    5    7

Thanks!

col0 col1 col2 col3 col4 col 5…
1 1 1 1 3 4
1 1 1 2 4 5
1 1 1 3 6 7
1 2 1 1 8 9
1 1 1 2 9 1
2 3 4 5 2 3
2 3 4 9 5 7

The selected rows should be the ones in bold

@bestRobot
Welcome to the forum,

have a look on post below as it has a potential to adopt it to your case:

Hi @bestRobot ,

Is this what you were looking for?

image

GroupingByMultipleColumns.xaml (6.5 KB)
TestData.xlsx (8.6 KB)

Kind Regards,
Ashwin A.K

1 Like