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 Super FREQ
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 Super FREQ

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 2024

Innovate_SAS_Blue.png

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!

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
  • 2781 views
  • 0 likes
  • 3 in conversation