Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

How to get the percentage of different group within same category in bar chart

Reply
New Contributor
Posts: 3

How to get the percentage of different group within same category in bar chart

Hi,

 

I am trying to create a bar chart in the report using SAS VA and I want to get the percentage of different group within same category. For example, I have group A, B and C. I use Year as category or the x-axis. I try to get the percentage so that if I add up the percentage for A, B and C in the same year it will be 100%. But currently the percentage will be 100% only when I add up the percentage for all the year.

 

Can someone help me with it? It is quite urgent.

 

Thanks!

SAS Super FREQ
Posts: 286

Re: How to get the percentage of different group within same category in bar chart

I'm not sure of a way to get the percentage of a subtotal like this in a bar chart.

For what it's worth, you can create percentage of subtotal for a crosstab.
New Contributor
Posts: 3

Re: How to get the percentage of different group within same category in bar chart

Haha, thanks Sam. I also got the crosstab one but my boss prefer the bar chart. Thanks for your reply!
Regular Contributor
Posts: 196

Re: How to get the percentage of different group within same category in bar chart

Hello Sagdec,

Use Group by option which is available in 'Roles'.
As per your data., Roles are...

Category : Year
Measure : Some X or Percentage.
Group (by) : Group.

Hope this helps you...

Let me know..

Thanks & Regards,
Teja Surapaneni
SAS Super FREQ
Posts: 286

Re: How to get the percentage of different group within same category in bar chart

[ Edited ]

Hi Teja,

 

The trouble is, the percentages are based on the full data and not the subgroup:

 

total.png

 

There doesn't seem to be an easy way to get these group subtotals in a barchart.

 

Sam

Regular Contributor
Posts: 196

Re: How to get the percentage of different group within same category in bar chart

Hello Sam, 

 

I got it.., I agree with u.. 

 

 

 

 

Teja

New Contributor
Posts: 3

Re: How to get the percentage of different group within same category in bar chart

Hi Teja, if I put percentage as measure it will show percentage of total not subgroup. But thanks for your reply!
Ask a Question
Discussion stats
  • 6 replies
  • 802 views
  • 0 likes
  • 3 in conversation