Hello all,
my goal is to display my data in a bar chart with 2 bars.
I have the data in one category, from which I want to use 5 variables.4 of these (A, B, C, D) should be blocks in bar 1. And the 5th (X) should be bar 2.
For this I have created a custom category using these 5 variables.
In setting up the customized category I created one value group "Bar 1" where i placed the 4 variables (A, B, C, D) for Bar 1, and another value group for "Bar 2" where I placed the 5th variable (X).
When I use my custom category in a bar chart, I now have two bars. One with A, B, C, D and one with X.
My question is:
In Bar 1. Can I customize the order of which A, B, C, D are stacked in the bar?
They are now, from bottom to top, placed as A, B, C, D. I see that I can right-click the bar chart and change the order between decending and ascending. This only gives me two display-options: A, B, C, D and D, C, B, A.
What if I want to display them as B, D, A, C ?
I have tried to edit the custom category and change the order there, but nothing happens.
Show us your code please.
I have done this is Visual Analytics using no code. Just dragged and dropped a bar chart and assigned data to it.
How are you creating the bar charts? Show us the code (in a code box, click on the little running man icon and paste the code into the window that appears; do not provide the code as a screen capture)
Which version are you using? And can you post an example of how your chart appears now
-------------------------------------------------------------------------
Four tips to remember when you contact SAS Technical Support
Creating Beautiful Reports
SAS Visual Analytics Learning Center
Hi,
Current version is SAS VA V.03.05M0P111119.
This is what the bar chart looks like. In the bar to the left, I want to place the middle block on the bottom.
(I always want the same order of the blocks, no matter the size of the blocks for the chosen period.)
Best regards,
Gustav
You said that you tried changing the order in your custom category. Have you tired creating a custom sort?
-------------------------------------------------------------------------
Four tips to remember when you contact SAS Technical Support
Creating Beautiful Reports
SAS Visual Analytics Learning Center
hi,
yes, I have tried changing order in my custom category.
Trying to create a custom sort on my custom category only allows me to change order of the value groups, but not the variables inside the value groups.
However, a colleague of mine did solve it earlier today by doing a custom sort on the original category, on which the custom cateogry was based.
Best regards,
Gustav
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 16. Read more here about why you should contribute and what is in it for you!
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.