Hello
I want to print in proc report only rows with BMI between 19 and 21
What is the way to do it?
proc report data=sashelp.class nowd;
column name weight height BMI;
define name / display;
define weight / display;
define height / display;
define bmi / computed format=4.1 'BMI';
compute bmi;
bmi = weight/(height*height)*703;
endcomp;
run;
Apply the same formula in a WHERE= dataset option or a WHERE statement.
proc report
data=sashelp.class (where=(19 le weight/(height*height)*703 le 21))
nowd
;
Thanks,
Is there a way to perform it with related to the computed column ?
In complicated cases the computed column is not simple calculation and then it will be difficult to apply it in such way
Thank you for the clarification!
I was not sure if there might be a trick to achieve this buried in PROC REPORT.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.