Traditional web-based reporting with SAS BI tools

Sort month abbreviation in a line graph

Reply
N/A
Posts: 0

Sort month abbreviation in a line graph

Hi,

I have a WRS line graph with a measure on the y axis and months on the x-axis. However, the month category contains short names for months: JAN, FEB, MAR, etc. As a result, my x-axis values are sorted alphabetically.

In my report I have also a month number available for sorting, but I'm not allowed to put more than 1 object on the x-axis.

Can anyone tell me how to sort the months based on month number?

thnx!
SAS Employee
Posts: 238

Re: Sort month abbreviation in a line graph

It sounds like the month column is actually a text field rather than a SAS date?
If you utilize a SAS date format, the sorting will be automatic. You also have the ability to choose from a multitude of formats. Included is the direct reference to format documentation (in SAS Base Language Dictionary: http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a001263753.htm)

~ Angela
Super Contributor
Posts: 356

Re: Sort month abbreviation in a line graph

Seen a SAS Note about this but couldn't find it but, below is a solution for a similar situation in a cross tab. You could create a format for you month number you have and use that variable.

Problem Note 38879: Months might not sort correctly in a crosstabulation table with a filter applied in SAS® Web Report Studio

http://support.sas.com/kb/38/879.html

Barry
N/A
Posts: 0

Re: Sort month abbreviation in a line graph

Thankx for your help. Still one question: where do I apply that user defined format? I cant find it in Information Map studio or in Web Report Studio.
SAS Employee
Posts: 238

Re: Sort month abbreviation in a line graph

Included is my blog post on how to make user-defined formats available to InfoMap Studio. http://sas-bi.blogspot.com/2010/01/using-custom-formats-in-information-map.html

~ Angela
N/A
Posts: 0

Re: Sort month abbreviation in a line graph

thanks all. I have it working now..!
Post a Question
Discussion Stats
  • 5 replies
  • 532 views
  • 0 likes
  • 3 in conversation