BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Bal23
Lapis Lazuli | Level 10

I am required to create a bar chart that drills down to a more detailed table. On the primary bar chart, i need to display the means of my dependent variable for each level of my independent variable. my independent variable is size, my dependent variable is rev. I do not know how to do with the primary bar chart, and struggle to do the second step for the "drils down". Any advice? Thanks.

data locrev;
	length Size State $ 8;
	format Rev dollar12.;  
	input Size State Rev;
	datalines;
big OH 136360000
big OR 189880000
small WA 145230
middle IL 1803800
small IN 136110
middle OH 1108400
middle MI 1966000
big FL 145410000
small GA 190220
;
run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

All output goes to the open destinations.  Starting with SAS 9.3, the ODS HTML destination is open by default.  You can open / close the destinations.  You are getting this log message because you have (somehow) closed all destinations.  Use "ODS HTML;" or "ODS LISTING;" to open these destinations before submitting your procedure code.  Various options can be specified.

 

There is plenty of documentation for this in SAS or can be found using Google.

http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/viewer.htm#a002262505.htm

https://support.sas.com/sassamples/graphgallery/PROC_GCHART.html - click on a graph to view the code.

 

View solution in original post

5 REPLIES 5
Bal23
Lapis Lazuli | Level 10

Thank you. That is helpful. But first, I need to create the primary bar chart to display the means of my dependent variable for each level of my independent variable  , that I do not know

proc gchart data=have;
   vbar3d size/ sumvar=rev patternid=midpoint html=rpt;
   type=mean
run;
quit;
          

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

243 run;

The error message show "type=mean" is wrong. But  I need to display the mean. Any advice?

 

Jay54
Meteorite | Level 14

Check the syntax for your code.  The " ; " should come after the TYPE option.

Bal23
Lapis Lazuli | Level 10

I added ;

but then there is a warning message:

 

no output destinations active

 

how should i modify my code so that I can generate this primary bar chart that displays the means of my dependent vars for each level of my independent vars?

Jay54
Meteorite | Level 14

All output goes to the open destinations.  Starting with SAS 9.3, the ODS HTML destination is open by default.  You can open / close the destinations.  You are getting this log message because you have (somehow) closed all destinations.  Use "ODS HTML;" or "ODS LISTING;" to open these destinations before submitting your procedure code.  Various options can be specified.

 

There is plenty of documentation for this in SAS or can be found using Google.

http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/viewer.htm#a002262505.htm

https://support.sas.com/sassamples/graphgallery/PROC_GCHART.html - click on a graph to view the code.

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of 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
  • 5 replies
  • 1363 views
  • 1 like
  • 3 in conversation