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.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1302 views
  • 4 likes
  • 2 in conversation