Data visualization with SAS programming

How to count the group percentage in Gchart

Reply
Contributor
Posts: 64

How to count the group percentage in Gchart


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,

Super Contributor
Posts: 543

Re: How to count the group percentage in Gchart

So,

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

Smiley Happy

Grand Advisor
Posts: 10,210

Re: How to count the group percentage in Gchart

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.

Ask a Question
Discussion stats
  • 2 replies
  • 296 views
  • 1 like
  • 3 in conversation