Dear team, I I have been stuck to find a solution to provide the output results for the 3 months. The solution does not work if I add months 04 and 05.
What is the best way to display the data for the condition WHERE Check = 0 and month = 03 04 05?
proc print data=Oth (obs=1000);
where Check=0 and month = 03;
run;
If month is numeric:
month in (3 4 5)
or if month is character:
month in ('03' '04' '05')
B.
If month is numeric:
month in (3 4 5)
or if month is character:
month in ('03' '04' '05')
B.
it is numeric, so
the code is the next:
proc print data=Ret_oth (obs=1000);
where Check=0 and reporting_month in (03 04 05);
run;
But still the results only provide 03 data
The following:
data Ret_oth;
do reporting_month = 1 to 5;
Check=0; output;
Check=1; output;
end;
run;
proc print data=Ret_oth (obs=1000);
where Check=0 and reporting_month in (03 04 05);
run;
works as expected.
Check you data (Maxim 3), maybe months 4 and 5 are after obs=1000?
Bart
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.