Hello everyone, I am trying to get a graph in a pdf in SAS from a table with 3 columns, the first ("fecha") has the type date: 10MAR22, 09MAR22, etc. the second column ("Rango_horas") has two values, "OFF-WORK" and "WORK", so each date value will be duplicated, 10MAR22 will have "OFF-WORK" and "WORK", and the last column (" AVG") has the average % of cpu used, i.e. a number.
I would like to make a bar graph showing the different dates and the value that AVG has for OFF-WORK and WORK for each of the dates.
I have this code:
ODS pdf file = '/xx/xx/xx/Namepdf.pdf';
Axis1
STYLE=1
WIDTH=1
MINOR=NONE
LABEL=( "%CPU")
ORDER=(0 TO 100 BY 10)
;
Axis2
STYLE=1
WIDTH=1
LABEL=( "Fecha")
VALUE=NONE
;
TITLE;
TITLE1 "TEST";
FOOTNOTE;
PROC GCHART DATA=WORK.QUERY_FOR_TEST1
;
VBAR
fecha
/
CLIPREF
SPACE=15
FRAME TYPE=SUM
COUTLINE=BLACK
RAXIS=AXIS1
MAXIS=AXIS2
LREF=4
CREF=LTGRAY
AUTOREF
;
/* -------------------------------------------------------------------
End of task code
------------------------------------------------------------------- */
RUN; QUIT;
TITLE; FOOTNOTE;
When I run this it adds the avg values of offwork and work, it does not distinguish the "Rango_horas" column and it creates a column for each date, I would like to see 2 columns for each date value. Would this be possible?
Thank you very much in advance