Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Custom Sort Order - Different order on a bar and line chart

Not applicable
Posts: 1

Custom Sort Order - Different order on a bar and line chart

__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?

Occasional Contributor
Posts: 8

Re: Custom Sort Order - Different order on a bar and line chart

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?

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation