Hello @pauliet987,
You can use PROC UNIVARIATE:
data have;
input Date :mmddyy. Patients Value;
format Date mmddyy10.;
cards;
01/02/2023 1 3
01/02/2023 2 4
01/05/2023 1 6
01/05/2023 2 7
01/05/2023 3 8
;
proc univariate data=have noprint;
by date;
var value;
output out=want geomean=geom_mean;
run;
proc print data=want;
format geom_mean 8.2;
run;
The BY statement assumes that the input dataset is sorted (or indexed) by date.