BookmarkSubscribeRSS Feed
Obsidian | Level 7

I am creating a pie chart to display the space utilized in each of the libraries in GB. 

Firstly, I have created a query to get the list of all libraries and space utilized by each of them. By using proc gchart, I am creating a pie chart as well. But the pie chart only gives me the slices of space utilized , How do I get "Others" slice to display the space not utilised.


For example, if the total space available is 500GB, I want the pie chart to display space utilised by A, B, C, D and others. 

How can we display the "Other" utilisation when my sql query will not have that detail. I know the total space available 500GB, do I need to calculate the other utilization manually. Please suggest.


My code is as follows:



proc gchart data=work.space_used_by_users;

PIE libvar/

SUMVAR =space_used













Chart created is attached. Here the total of all the slices sums upto 100%. But the others is missing.


Super User

The simplest approach would be to add a record with the amount of space. That would be to subtract the total actually used from the known space. A couple of steps such as Proc summary to get the total used and a data step to the "other" Or a subquery to do the same. Append to your existing graph data set with an appropriate label and not use the OTHERLABEL  option.


Any pie chart, and most others, will require an actual value as the graphing procedures can not guess what the total available should be to calculate an other value.



Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.


Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 


Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 2 in conversation