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 

5 REPLIES 5
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?

Meaust1995
Calcite | Level 5
To manually arrange the column order in a crosstab table in SAS Visual Analytics, use the Roles pane.
Locate the Roles pane: In your SAS Visual Analytics report, select the crosstab object. The Roles pane will typically appear on the right-hand side of the interface.
Identify the relevant role: Within the Roles pane, locate the role that contains the data items you want to reorder (e.g., "Columns," "Measures").
Drag and drop: Hover your pointer over the data item within the role that you wish to move. A grip indicator (often a set of dots or a cross) will appear. Click and drag this indicator to move the data item to its desired position within the list.
Repeat for other columns: Continue this process for any other columns you want to reorder. The order in the Roles pane will reflect the order in the crosstab table.
Meaust1995
Calcite | Level 5

To manually arrange the column order in a crosstab table in SAS Visual Analytics, use the Roles pane.
Locate the Roles pane: In your SAS Visual Analytics report, select the crosstab object. The Roles pane will typically appear on the right-hand side of the interface.
Identify the relevant role: Within the Roles pane, locate the role that contains the data items you want to reorder (e.g., "Columns," "Measures").
Drag and drop: Hover your pointer over the data item within the role that you wish to move. Summit County Auditor grip indicator (often a set of dots or a cross) will appear. Click and drag this indicator to move the data item to its desired position within the list.
Repeat for other columns: Continue this process for any other columns you want to reorder. The order in the Roles pane will reflect the order in the crosstab table.

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