I think using Stacked column might be the easiest option if I understand correctly what you want.
Start data:
jthi_0-1691696648010.png
Stack the data columns (column 2 and column 3):
jthi_1-1691696669021.png
Add new formula column to check if row is max for specific Label
:Data == Col Max(:Data, :Label)
From here you have 1 on those rows which are maximum for labels
jthi_2-1691696719793.png
-Jarmo