I have created a simple pie chart, but I want the pie chart to display the MEAN (average) of a specific column, which is the "PRICE" attribute from my dataset. My dataset has two attributes - PRODUCT and PRICE.
Below, shows my SAS code used to create the pie chart - but I need some help on how to get the pie chart to display the MEAN for my "PRICE" attribute.
Thanks - any help is much appreciated.
PROC TEMPLATE;
DEFINE STATGRAPH MyPieChart;
BEGINGRAPH;
ENTRYTITLE 'AVERAGE PRICE OF PRODUCTS';
LAYOUT REGION;
PIECHART CATEGORY=PRODUCTS RESPONSE=PRICE; // I THINK THE CODE NEEDS CHANGING HERE?
ENDLAYOUT;
ENDGRAPH;
END;
RUN;
PROC SGRENDER TEMPLATE=MyPieChart DATA=WORK.IMPORT;
RUN;
