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..!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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