BookmarkSubscribeRSS Feed
Surya1203
Fluorite | Level 6

Hi SAS Community,

I hope you're doing well.

I'm currently working on a dataset in SAS and would like to arrange the columns in a specific order based on my personal preference, rather than the default or alphabetical order.

Specifically, I'm using SAS Visual Analytics and working with a crosstab table. I'd like to control the order in which the columns appear in the crosstab, regardless of how they are sorted in the dataset or metadata.

Is there a way to manually set or customize the column order within a crosstab in SAS Visual Analytics? Any guidance, steps, or best practices would be greatly appreciated.

 

 Thank you in advance for your support!

@Joy_SAS 

3 REPLIES 3
tsukune
SAS Employee

You can see the expected result by creating a custom sort order.

 

Here is the overview how to create a custom sort order in SAS Visual Analytics:

tsukune_0-1750395831703.png

 

tsukune_2-1750395947981.png

 

Output

Before

tsukune_6-1750396368655.png

After

tsukune_7-1750396421860.png

 

For more information, please refer to SAS blog from the following link:
SAS Visual Analytics: creating a custom sort order - SAS Users

Surya1203
Fluorite | Level 6
Thank you for your response! Just to clarify my query — I want the entire column of measure values to be placed under the var1 column, and the corresponding variable names to appear in the var2 column.
Is it Possible ?
tsukune
SAS Employee

I'm sorry, but it is not clear for me what you want in crosstab. Could you please use our sample data like SASHELP.CLASS to create a screenshot of expected output in Excel to describe the requirement for the report?

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 3 replies
  • 1095 views
  • 2 likes
  • 2 in conversation