BookmarkSubscribeRSS Feed
msricha2
Calcite | Level 5

I am currently working on a project in which I am looking at three different types of patients. For two of the patient types, there is a count variable, a Bed to RN variable, and an AVS to ED Departure Variable. The third patient type has the Count and Bed to RN variables, but instead of the AVS to ED Departure variable, it has an IP Bed Ready variable. Since I am reporting by type, this leaves three blank columns in my report. I can't do a noprint option because it will get rid of the variable across the board, not just for the patient type. Is there a way I can do a conditional noprint option? I have attached my code so hopefully it makes sense.


3 REPLIES 3
ballardw
Super User

What do you want your output to look like? That will probably get better responses.

Astounding
PROC Star

I'm not sure if there's a difficult solution or not, but there's certainly an easy one.  Why not just run PROC REPORT twice?  Use a different WHERE statement to select the TYPE(s), and change the final column appropriately.

Good luck.

Cynthia_sas
SAS Super FREQ

Hi:

  I'm having a hard time visualizing your data from just seeing your code. There is not anything like a conditional NOPRINT with PROC REPORT. However, when you are in an ACROSS scenario, PROC REPORT tries to help you out by "completing" all the categories under an ACROSS item. Sometimes, this is what you want; sometimes not. I would recommend that you try to turn off the automatic completion of columns by using NOCOMPLETECOLS statment in your PROC REPORT code:

proc report data=xxx.yyy nowd nocompletecols;

...more code...

run;

  If that doesn't work for you, then you might want to open a track with Tech Support. Running PROC REPORT twice is one option; there might also be a way to manipulate your data so that you have some kind of better type indicator variable for each of your columns and then you have a simple COUNTVAR for each type indicator variable. At any rate, Tech Support can look at all of your data and all of your code and help you come to the best solution.

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 638 views
  • 0 likes
  • 4 in conversation