BookmarkSubscribeRSS Feed
avinesh
Fluorite | Level 6

I am facing sorting issue in Crosstab

here i am annexing my sample input and output data

Can anyone help me out to get my output likes in crosstab..


sampleinputdata.pngSampleoutput.png
1 REPLY 1
RickStyll_SAS
SAS Employee

By default, Visual Analytics reports sort categories alphabetically, so Turmeric 1kg will come before Turmeric 500g, for instance.  It looks like you need a custom sort order so that Turmeric 1kg comes  after Turmeric 500g.    You can achieve a custom sort using a numeric underlying column as a category data item that displays a custom user defined format. Note that the next release of Visual Analytics will give you a way to define custom sorting for any category data item in your report.  Even then, user defined formats still could be best option for custom sorting when the category has many distinct values and where the custom sort is needed on many reports.

The following is pasted from a page in the SAS Visual Analytics 6.4 User’s Guide, http://support.sas.com/documentation/cdl/en/vaug/67270/HTML/default/viewer.htm#p0uroboxihl12on1pzzkf...

  1. (Optional) To see more information about a data item, select it in the list. The Name, Role, Format, and Aggregation are displayed in the data item table below the list of data items. For a category data item with a user-defined format that has an underlying numeric value, you can specify Sort Options.

I hope this helps.

Rick Styll

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

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
  • 1 reply
  • 1196 views
  • 4 likes
  • 2 in conversation