Hi,
Why call define works with display variables but not with analysis variables ?
proc report data=sashelp.class;
column name--height;
define name / display;
define sex / display;
define age / display;
*define age / analysis mean;
define height / analysis mean;
compute age;
if age=12 then call define(_row_,'style','style=[background=lightpink]');
endcomp;
rbreak after / summarize;
run;
When age is used as display the row where age=12 will be in lightpink, but by definition, the mean won't be available.
If we change age to analysis mean, the mean will be calculated but the rows won't be in lightpinkt.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.