BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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!
5 REPLIES 5
AngelaHall
SAS Employee
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
twocanbazza
Quartz | Level 8
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
deleted_user
Not applicable
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.
AngelaHall
SAS Employee
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
deleted_user
Not applicable
thanks all. I have it working now..!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1280 views
  • 0 likes
  • 3 in conversation