For each loop in group wise

Hi @Jesmine,

Go with the approach @saurabhB said. That is the most robust way to get what you want.

I do think you will also want to sort the other two columns when you make such groups corresponding to the name column (Sort which affects all columns).

You can either use the Index ( in your case 1, or the name of the column)
If the column is string, sort goes from a-z or z-a

When using a dummy data :

SortDataTable.xaml (8.4 KB)