BookmarkSubscribeRSS Feed
TomKari
Onyx | Level 15

Hi. When I run the following code...

 

data pie1;
	do i=1 to 1000;
		v=5;
		output;
	end;
	v=10;
	output;
	v=15;
	output;
	v=20;
	output;
run;

ods listing gpath='/home/xxx/AHAGM/images';
ods graphics / imagename="pie1" imagefmt=png;
title "pie1";

proc sgpie data=pie1;
	pie v / otherpercent=0;
run;

I get this result. My understanding is that using "otherpercent=0" should cause all slices to appear and be labelled.

 

sas1.jpg

1 REPLY 1
data_null__
Jade | Level 19

I think you need to specify the label with OTHERLABEL

data pie1;
	do i=1 to 1000;
		v=5;
		output;
	end;
	v=10;
	output;
	v=15;
	output;
	v=20;
	output;
run;

*ods listing gpath='/home/xxx/AHAGM/images';
*ods graphics / imagename="pie1" imagefmt=png;
*title "pie1";

proc sgpie data=pie1;
	pie v / otherpercent=1 otherlabel='Other';
run;

Screenshot 2026-06-03 133658.png

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand in the Innovate Hub.

Watch Now →
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 46 views
  • 0 likes
  • 2 in conversation