BookmarkSubscribeRSS Feed
ursula
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,

2 REPLIES 2
AncaTilea
Pyrite | Level 9

So,

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

Smiley Happy

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 2 replies
  • 863 views
  • 1 like
  • 3 in conversation