BookmarkSubscribeRSS Feed
Nikster101
Fluorite | Level 6

Hi there. I have the following proc freq procedure:

proc freq data=project;
tables gradind;
format gradind newh.;
tables quintile;
format quintile new.;
tables nsfasyn;
format nsfasyn $newn.;
tables nsfasyn*quintile*gradind/ plots=freqplot (twoway=cluster scale=percent) out=graphs5;
run;

 The graphs below are from the proc freq procedure:

Nikster101_0-1634799550293.pngNikster101_0-1634799550293.pngNikster101_1-1634799562236.pngNikster101_1-1634799562236.png

How do I call the graph NSFASYN= NO FUNDING only into the proc sgplot prcedure? (or even the NSFASYN= FUNDING only). I have tried using the (where=(nsfasyn='No Funding')) in the sgplot statement but it did not work. Any ideas

 

proc sgplot data=graphs5 (where=(nsfasyn='No Funding'));
vbar quintile/ group=gradind groupdisplay=cluster response=percent datalabel;
run;

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

I have tried using the (where=(nsfasyn='No Funding')) in the sgplot statement but it did not work

There's no reason it shouldn't work. Is that the correct value (including case)? What does the log report read?

 

Nikster101
Fluorite | Level 6

It did not generate a log, I am unsure of what happened. When I took out the where statement it generated the log and output graph

CFC_SAS_Communities_400x225.jpgCFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1555 views
  • 0 likes
  • 2 in conversation