Please clarify your question. Have you imported an Excel sheet into a SAS dataset and want to calculate the mean age across all rows? Or are you trying to do something else?
Assigning the mean age to another variable is preferable:
proc sql;
create table want as
select *
,mean(age) as mean_age
from have
;
quit;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Registration is open
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!