BookmarkSubscribeRSS Feed
Sagdec
Calcite | Level 5

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!

6 REPLIES 6
Sam_SAS
SAS Employee
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.
Sagdec
Calcite | Level 5
Haha, thanks Sam. I also got the crosstab one but my boss prefer the bar chart. Thanks for your reply!
TejaSurapaneni
Lapis Lazuli | Level 10
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
Sam_SAS
SAS Employee

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

TejaSurapaneni
Lapis Lazuli | Level 10

Hello Sam, 

 

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

 

 

 

 

Teja

Sagdec
Calcite | Level 5
Hi Teja, if I put percentage as measure it will show percentage of total not subgroup. But thanks for your reply!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 3285 views
  • 0 likes
  • 3 in conversation