BookmarkSubscribeRSS Feed
HashimBasheer
Fluorite | Level 6

I have a requirement for a report.

The output should be a crosstab report with total 3 columns.

1. Category(loan type,term loan, utlilization etc)

2. Months and yetd value(january14,february14....YTDFy1415)

3. $ amount.

The problem is In the crosstab report, if I give month values as character it wont be sorted in the desired order.How can I get the columns in the corrected order? I cant use the list report for this as the Month values wil get changed on a timely basis. Is there any way if we can get the months sorted in the below order (without adding prefixes)

Month values shud be sorted as below.

Jan - 14

Feb -14

Mar-14

.

.

.

YTDFY1415

4 REPLIES 4
ballardw
Super User

A generic and across the board pretty powerful approach is to create a SAS date variable and use those with appropriate formats.

HashimBasheer
Fluorite | Level 6

thanks for the response. Now I have all the period values in one column, how can I apply the different formats?

HashimBasheer
Fluorite | Level 6

thanks for the response. Now I have all the period values in one column, how can I apply the different formats? I tried creatting date variables for the variables and for the ytd columns, I gave some future date so that it comes last in the sequence. But the business would like to see the YTD column as YTD_FY13-14. How wecan achieve this? I tried user defined formats. For some reasons its not getting displayed in the infomaps

ballardw
Super User

The method may depend, or be more specific, if you can show how you are generating the crosstab. There are different approaches depending on the procedure used.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 4 replies
  • 5927 views
  • 0 likes
  • 2 in conversation