Data visualization with SAS programming

primary bar chart, and a bar chart that drills down to a more detailed table

Accepted Solution Solved
Reply
Super Contributor
Posts: 338
Accepted Solution

primary bar chart, and a bar chart that drills down to a more detailed table

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;

 


Accepted Solutions
Solution
‎06-19-2016 11:50 AM
SAS Super FREQ
Posts: 1,139

Re: primary bar chart, and a bar chart that drills down to a more detailed table

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


All Replies
Super User
Posts: 19,093

Re: primary bar chart, and a bar chart that drills down to a more detailed table

Super Contributor
Posts: 338

Re: primary bar chart, and a bar chart that drills down to a more detailed table

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?

 

SAS Super FREQ
Posts: 1,139

Re: primary bar chart, and a bar chart that drills down to a more detailed table

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

Super Contributor
Posts: 338

Re: primary bar chart, and a bar chart that drills down to a more detailed table

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?

Solution
‎06-19-2016 11:50 AM
SAS Super FREQ
Posts: 1,139

Re: primary bar chart, and a bar chart that drills down to a more detailed table

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.

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 274 views
  • 1 like
  • 3 in conversation