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!
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:
Output
Before
After
For more information, please refer to SAS blog from the following link:
SAS Visual Analytics: creating a custom sort order - SAS Users
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?
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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.