BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SASguyCO
Calcite | Level 5

Hi everyone-

I'm having issues with my date values changing when I run a proc gplot or gchart.

Here is a simple example with output I dervied that illustrates the problem.  My dates are only 1/1/2012 and 2/1/2012, yet when I graph it 1/3/2012, 1/13/2012, 1/23/2012, and 2/2/2012.  Does anyone know why this is happening? I only want two dates showing, the only two in the data set 1/1/2012 and 2/1/2012 and ideally in the mmyyd7. format. 

thank you!

data t2;

format breakout $15. ;

input breakout $ value date:mmddyy10.;

datalines;

group1 41 1/1/2012

group1 25 2/1/2012

group2 15 1/1/2012

group2 7  2/1/2012

group3 63 1/1/2012

group3 21 2/1/2012

group4 9  1/1/2012

group4 32 2/1/2012

;

run;

proc gchart data=t2;

format date mmddyy10.;

vbar3d date /sumvar=value subgroup=breakout

     width=9

     space=4

     cframe=gray;

run;

quit;

graph.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

GCHART is trying to bin your time data. Just use the DISCRETE option on the VBAR3D statement, and you'll get what you want.

Hope this helps!

Dan

View solution in original post

2 REPLIES 2
DanH_sas
SAS Super FREQ

GCHART is trying to bin your time data. Just use the DISCRETE option on the VBAR3D statement, and you'll get what you want.

Hope this helps!

Dan

SASguyCO
Calcite | Level 5

That did it Dan!

Thanks a ton!

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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