BookmarkSubscribeRSS Feed
gorkemkilic
Calcite | Level 5

Hi ,

 

One of my colleagues has the following question regarding to the Bar plot in SAS Enterprise guide.

 

"See the following table:

days    amount

1          10

31        20

60         5

 

When I generate the bar plot to sum up the amount based on different days, with bar values specified to be 30 and 60. The bar plot has two bars, one is at value 30 which has an amount of 10+20=30, the other bar is at value 60, and has value 5. Why is the first bar value (i.e., 30) also includes the second row? Shouldn't the bar chart value be 10 and 25 in this case?

 

How is the categorization done? Isn't it days<=30, and days between 30 and 60?

"

Thanks in advance

 

 

2 REPLIES 2
ballardw
Super User

Post the code that generates the issue. There are enough options we don't want to guess. Also are any custom formats involved?

gorkemkilic
Calcite | Level 5

Hi,

 

You could find the code that generates issue below. Thanks in advance.

 

PROC SQL;
 CREATE VIEW WORK.SORTTempTableSorted AS
  SELECT T.days, T.amount
 FROM WRK.ding_bar_temp as T
;
QUIT;
Axis1
 STYLE=1
 WIDTH=1
 MINOR=NONE


;
Axis2
 STYLE=1
 WIDTH=1


;
TITLE;
TITLE1 "Bar Chart";
FOOTNOTE;
FOOTNOTE1 "Generated by the SAS System (&_SASSERVERNAME, &SYSSCPL) on %TRIM(%QSYSFUNC(DATE(), NLDATE20.)) at %TRIM(%SYSFUNC(TIME(), TIMEAMPM12.))";
PROC GCHART DATA=WORK.SORTTempTableSorted
;
 VBAR
  days
 /
 SUMVAR=amount
 CLIPREF
FRAME MIDPOINTS=30 TO 60 BY 30
 TYPE=SUM
 COUTLINE=BLACK
 RAXIS=AXIS1
 MAXIS=AXIS2
;
/* -------------------------------------------------------------------
   End of task code.
   ------------------------------------------------------------------- */
RUN; QUIT;
%_eg_conditional_dropds(WORK.SORTTempTableSorted);
TITLE; FOOTNOTE;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 865 views
  • 0 likes
  • 2 in conversation