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_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

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

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
  • 1041 views
  • 0 likes
  • 2 in conversation