Help using Base SAS procedures

running gchart with group (sorted) but having the htm output sorted on another field.

Reply
New Contributor
Posts: 2

running gchart with group (sorted) but having the htm output sorted on another field.


Hi, I'm pulling my hair out any help would be appreciated as I'm not a sas programmer. I want to run a gchart  on a grouped  but I want the htm file to be populate based on another field in that data sorted descending, here are examples of data and basic gchart.

     DATE    SUBFUNC      MIPS

05MAY2014    ACTXXX       0.05

06MAY2014    ACTXXX       0.06

07MAY2014    ACTXXX       0.04

08MAY2014    ACTXXX       0.06

05JUN2014    ADTXXX       0.01

06JUN2014    ADTXXX       0.01

07JUN2014    ADTXXX      0.01

08JUN2014    ADTXXX       0.01

05JUL2014    COMPXXX     27.08

06JUL2014    COMPXXX     23.16

07JUL2014    COMPXXX     51.50

08JUL2014    COMPXXX     49.08

05JUL2014    EDITXXX     15.78

06JUL2014    EDITXXX     14.07

07JUL2014    EDITXXX     31.28

08JUL2014    EDITXXX     31.41

PROC GCHART DATA=damips;           

  by subfunc;                      

TITLE " Mips per Subfunction";    

  VBAR3D date /                    

  raxis=axis3                      

  autoref                          

  discrete                         

  name="damips"                    

  sum                              

  GROUP=subfunc                    

  SUMVAR=mips                     

My problem is the the htm file is being populated is based on subfunc sort order and I would like to have the mips descending be the order the charts appear in the htm file. Does that make sense?

Super User
Posts: 10,550

Re: running gchart with group (sorted) but having the htm output sorted on another field.

Using "By Subfunc" pretty much means that is the sort order of the charts. I can't quite visualize what you want with reference to "mips descending order". Can you make a dummy example of what you would expect this to look like using another program?

Often to control orders of appearance you may need to pre-summarize or add order or dummy values for variables depending on the specific appearance wanted.

New Contributor
Posts: 2

Re: running gchart with group (sorted) but having the htm output sorted on another field.

Hi ballardw,  after reviewing what I wrote I see it was a terrible description my apologies. I'm creating vbar charts of daily mips for each subfunc, 60-80 of them. Some of these subfuncs use .01 mips per day and others can use 1000 mips per day. I want my HTM output file to have the higher daily mip subfuncs at the top of the report, right now sorted by subfunc they're all at the bottom of the htm file, I have to page down to bottom to see the heavy hitters 'high mips' subfuncs, all start down around P or so.

Does that make more sense? I am currently looking at ranking the subfunc based on mips but I don't know how I'd run that through gchart and still have the report based on sunfunc. Thanks for your time.

Ask a Question
Discussion stats
  • 2 replies
  • 153 views
  • 0 likes
  • 2 in conversation