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

Hi,

 

is it possible to take a standard bar chart in VA and sort it by a measure instead of a category?

 

If got a bar chart that shows for each day the limit utilization in percentages for counterparties. It's not a stacked bar chart. The only sorting option I find is by category, here Counterparty, and as such either ascending or descending alphabetically. I've applied a rank on the bar chart only showing me the latest available date from the underlying dataset and would like to sort the bars according to the limit utilization from the highest to the lowest.

 

Does anyone have pointers for me how to do so?

 

I'm using version 7.4.

1 ACCEPTED SOLUTION

Accepted Solutions
KeithM
SAS Employee

Here is an example that might be similar to what you want to do.  In this sample, you end up creating a custom graph.

http://support.sas.com/kb/59/480.html

 

View solution in original post

12 REPLIES 12
Tommy1
Quartz | Level 8

I don't use SAS VA so I am not entirely sure, but does creating a custom sort help fix your problem?

https://blogs.sas.com/content/sgf/2015/02/27/sas-visual-analytics-creating-a-custom-sort-order/

 

Best,

Tom

OttarV
Calcite | Level 5

Hi Tommy1 thanks for the suggestion!

 

I've looked into it and it seems custom sort is only available on categories and then it is fixed. So lets say I choose a certain sort of X Y Z based on their utilization at present time, then going forward a month Z X Y might be the top three but I'm stuck with the X Y Z sorting. I'm more looking for a dynamic sorting based on a measure.

 

Kind regards,

Ottar

BrunoMueller
SAS Super FREQ

You should be able to sort by the measure, using RightMouseButton on the measure and sort accordingly

OttarV
Calcite | Level 5

Hi Bruno, thanks for the suggestion!

 

I looked into this and my Y axis which contains the utilization does not allow right mouse click -> sort. From what I've seen so far it is only possible on the X axis.

 

Kind regards,

Ottar

BrunoMueller
SAS Super FREQ

You should send the role assignment and a screenshot of your graph, to help you more. you mentioned you are not using a stacked bar chart, so the sort should just work.

OttarV
Calcite | Level 5

This is a screenshot of the barchart as is looks now. The sorting is based on Counterparty going from A-Z. On the Y axis there is utilization which I'd like to sort by, going from highest to smallest, left to right but I can't seem to make it work 😕

capture.PNG

BrunoMueller
SAS Super FREQ

Well I can still not see the roles assigned to this graph, so I am just guessing:

  • you have a category
  • you have one measure
  • you have set a category to the group role, this will create the colored bars
  • grouping style is clustered

Is this correct?

 

This is possible with VA7.5  (based on SAS 9.4, not out yet) or VA8.3 (based on SAS Viya), here is a screenshot from VA7.5

va75_sort.png

 

 

 

OttarV
Calcite | Level 5
I have two categories, one is reference date (shown below the colored bars) the other is the counterparties which are the colored bars and sorted alphabetically.

I've got one measure, on the Y axis which is utilization percentage for a counterparty per day. and it is a group role. Grouping style is clustered.

The graph has a rank which always shows the latest reference date.

We just had our VA upgraded to 7.4 and we're using SAS 9.4 I believe. So it seems to me that this is something that was not addressed until 7.5.
KeithM
SAS Employee

Here is an example that might be similar to what you want to do.  In this sample, you end up creating a custom graph.

http://support.sas.com/kb/59/480.html

 

Sam_SAS
SAS Employee
Hello,

I believe that in 7.4, you cannot sort a *grouped* bar chart by the measure value. If there is no group role set, then you can sort by the measure.

KeithM's post above should provide a workaround to this.

Sam
OttarV
Calcite | Level 5
Hi Sam,

this worked like a charm, a nice workaround until we upgrade to 7.5.
OttarV
Calcite | Level 5
Thanks Keith!

For us users using 7.4 this seems to be the only way of doing this.

SAS Innovate 2025: Call for Content

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 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 12 replies
  • 6172 views
  • 0 likes
  • 5 in conversation