BookmarkSubscribeRSS Feed
Pyrite | Level 9

Hi there,

I wonder if somebody can help me to figure it out of how to code the group percentage in Gchart.

I have 3 groups in one Gchart. for example: first group is US (female , male)

                                                                 second group is AU (female, male)

                                                                 Thirth group is Hawaii (female, male)

I want to code the female and male percentage for US, AU and Hawaii individually, so each group has the total percent of 100%

- percent female and male in US. for example: 60% female and 40% male.

- how many percent female and male in AU. for example 25% female and 75% male

- how many percent female and male in Hawaii. for example 50% female and % male

when I created a Gchart for the 3 group, I got the total 100% for the 3 groups (for example: US (female=10% male=20%), AU(female=20% male=30%) Hawaii(female=10% male=10%)),this is not what I expected.

Please help me to solve the problem.

Thank you,

Pyrite | Level 9


I believe you will need your group variable to be the US,AU,HAWAII, and then have gender as a subgroup.

Smiley Happy

Super User

It is helpful to post the code you used when asking questions as you could be very close and only need minor changes or sometimes the data needs to preprocessed.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register 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.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1 like
  • 3 in conversation