I have to identify which sneaker (variable 1) is matched (same row) with the highest and lowest sales (variable 2) by using a SAS procedure function.
Current code:
PROC MEANS DATA = M4.sneaker min max; Class salesThisPeriod; RUN;
I have to identify which sneaker (variable 1) is matched (same row) with the highest and lowest sales (variable 2) by using a SAS procedure function.
Current code:
PROC MEANS DATA = M4.sneaker min max; Class salesThisPeriod; RUN;
Copyright © 2021 Jogjafile Inc.
You can try using the IDGROUP feature of the OUTPUT statement of PROC MEANS (aka PROC SUMMARY). But to get both min and max you will need to write two output datasets.
Result