BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SASEnthusiast
Obsidian | Level 7

Hi,

 

Is there a way to create a Stacked plus a general bar in SAS VA.

 

I have three capacities:

 

1. Budget Capacity

2. Available Capacity

3. Allocated Capacity

 

where, Budget Capacity= Allocated Capacity + Available Capacity

 

I wish to make a graph in which each category has two bars. One for budget capacity and the other stacked one for Allocated + Available.

1 ACCEPTED SOLUTION

Accepted Solutions
Lodewijk
Obsidian | Level 7

Hi SASEnthusiast,

 

You can create the graph you want with the Custom Graph Builder. You can put two bar charts on top of eachother and have them share the category (x-axis). Initially it looks like this:

 

1.PNG

 

Bar Chart 1 allows multiple data assignments by default, Bar Chart 2 doesn't. You can change this by editing the Role for Bar Chart 2 Measure if you like. For stacked charts you obviously need multiple assignments 🙂

 

Now to show them next to eachother, play around with the properties. 

 

Under Plot Display, for bar chart 1 set the bar spacing to something like 65 and set the discrete offset to -20 negative. This makes a slimmer bar and pushes it to the left. Do the same for bar chart 2, but with a positive offset to push it to the right. You'll see that they are next to eachother.

 

Under Groups, set the grouping style to "Stack" for the bar chart you want to have stacked.

 

 

2.PNG 

 

Now save it and use it in the report. Assign the budget capacity as the measure for the unstacked chart, and the Available and Allocated as the measures for the stacked chart.

View solution in original post

6 REPLIES 6
TejaSurapaneni
Lapis Lazuli | Level 10

Hello  SAS Enthusiast,

 

 

I have some stuff for you,

 

 

Exp.png

Hope this will help,

 

Let me know...

 

 

Thanks & Regards,

Teja Surapaneni

SASEnthusiast
Obsidian | Level 7

Hi Teja,

 

This is really what I need. Could you guide me towards the steps for this?

Also, can the aggregation (as in yours) be a predefined column and not a calculated column?

Lodewijk
Obsidian | Level 7

Hi SASEnthusiast,

 

You can create the graph you want with the Custom Graph Builder. You can put two bar charts on top of eachother and have them share the category (x-axis). Initially it looks like this:

 

1.PNG

 

Bar Chart 1 allows multiple data assignments by default, Bar Chart 2 doesn't. You can change this by editing the Role for Bar Chart 2 Measure if you like. For stacked charts you obviously need multiple assignments 🙂

 

Now to show them next to eachother, play around with the properties. 

 

Under Plot Display, for bar chart 1 set the bar spacing to something like 65 and set the discrete offset to -20 negative. This makes a slimmer bar and pushes it to the left. Do the same for bar chart 2, but with a positive offset to push it to the right. You'll see that they are next to eachother.

 

Under Groups, set the grouping style to "Stack" for the bar chart you want to have stacked.

 

 

2.PNG 

 

Now save it and use it in the report. Assign the budget capacity as the measure for the unstacked chart, and the Available and Allocated as the measures for the stacked chart.

SASEnthusiast
Obsidian | Level 7

This works beautifully. Thank you so much.

AnnaBrown
Community Manager

I'm glad you found some useful info, SASEnthusiast! Can you highlight the exact solution to your problem by "Accepting it as a solution"? And if one was particularly helpful, feel free to "Like" it. This will help other community members who may run into the same issue know what worked.

Thanks!
Anna


Join us for SAS Community Trivia
SAS Bowl XXIX, The SAS Hackathon
Wednesday, March 8, 2023, at 10 AM ET | #SASBowl

Joy_SAS
SAS Employee

For more information about SAS Visual Analytics Graph Builder, see Creating and Using Custom Graph Objects in the SAS Visual Analytics 7.3 User's Guide.  (A similar chapter is available in the 7.2, 7.1, 6.4, and 6.3 user's guides.)

 

-Joy

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!

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
  • 1661 views
  • 3 likes
  • 5 in conversation