I'm trying to use PROC REPORT to create a report using missing values for only some of the columns, but not others. According to the documentation, adding the MISSING option to a DEFINE statement should allow missing values to be displayed for that particular column variable, but that isn't working the way it should. The procedure strips all missing values out of the report anyway. If I add MISSING to the PROC REPORT statement then I get missing values for all of the columns, which is not what I want. Thanks for any help you can provide!
Here is my code:
proc report data=arccoal nowd headline headskip;
column statecode bea_fips bea_placename coal_production,cal_yr;
define statecode / group 'State' missing;
define bea_fips / group 'BEA FIPS' style(column)={tagattr="type:String"} missing;
define bea_placename / group 'BEA Place Name' missing;
define cal_yr / across '';
define coal_production / analysis sum format=comma16. '' missing;
COMPUTE statecode;
IF statecode NE '' then hold=statecode;
IF statecode EQ '' then statecode=hold;
ENDCOMP;
run;
Please provide us a portion of the data via these instructions (and not via any other method)
https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/
Please show us the incorrect output as a screen capture and not as an attachment.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.