How to compute highest value in a group for multiple groups

Hey, hope you're all doing well.

I wanted to compute the highest value from a group of values for each group. For example, from the data below, I would like to get the highest "Lab" value for each given specific "ID". There are 5 IDs (36, 37, 39, 65, 66) with each having one or more associated lab values. Is there a way to compute the highest value (the peak lab value) for each ID. This would generate 5 "Peak" values

This would be applied to a longer list of IDs.

Any help would be greatly appreciated.



TS Contributor
If you want a list of highest values, then you can use the procedure MEANS with Id as grouping
variable, and request MAXIMUM there.
If you want to add the highest value as a variable to the data file, then you can use AGGREGATE
with Id as break variable.

With kind regards