Dear @PeterClemmensen thank you for answering, it helped me a lot. In case I want to make simple bar graphs to all vars in the dataset (for example suicides and homicides), in separate plots, but not by year (just simple count or percentage bar graph), how could I do it? I tried to use a mock year variable with a constant value, and I almost got it, but only the first value and case in each variable are presented. For example, the below graph is for variable "FASE"; this variable has two values, 1 and 2, but only 1 was presented, and the count is one (should be 422): The code I used was: proc transpose data=merge0 out=plotdata;
by year;
run;
proc datasets lib=work memtype=data nolist;
modify plotdata;
attrib _all_ label='';
rename col1=value _NAME_=group;
run;quit;
proc sort data=plotdata;
by group;
run;
proc sgplot data=plotdata;
hbar Value;
by group;
run; Thank you very much for your attention. Best wishes
... View more