__visiHi All,
Currently using SAS VA 7.1 and have hit an odd issue with custom sorts.
I've created a custom sort on a category in order to display a stacked chart in a specific order, grouping similar elements together and shading them using a report level display rule.
Both charts use the same roles, A date for the Category, a number of hours for the measure and a grouping which has my custom sort.
My first graph is a stacked 100% bar chart. The grouping display is perfect with the group order being as per my custom sort.
The issue is when I do a stacked line chart, the sort order isn't quite right.
My Group role has 17 distinct values, and I have it sorted in my desired order (and lets just reference that as values 1 -> 17)
The bar chart will display it in order of 1 -> 17 (with sort item 1 being at the bottom of the stack and sort item 17 being at the top of the stack)
The line chart will display it in order of 1 -> 2, 5->17, 3, 4 (So sort items 3 and 4 are placed as though they were in positions 18 and 19).
Is there something I'm missing?
On a side note, why can I not have a normalised 100% line graph?
I did some playing around and I think I can see what it's doing.
The graph spans a number of months. Towards the early months in the graph, there are only 15/17 items that exist in the data that I am attempting to sort.
Towards the final months in the graph (when the new items begin appearing) I then have 17/17 items, however rather than sorting it as expected, the 15 items that existed at the start are sorted, but the 2 new items just seem to be tossed in randomly.
I tested it by scaling the graphs reporting range and when the first month includes the 2 new items, it sorts it correctly.
Any thoughts on how I could correct this aside from creating 17 dummy entries at the start to ensure my sort order is taken into consideration at the beginning?
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.