=MAXIFS(B1:J1,K1,0)
This formula will work for row 1.
Further reference here https://support.microsoft.com/en-au/office/maxifs-function-dfd611e6-da2c-488a-919b-9b6376b28883