Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Crosstab Sorting issue

Reply
Contributor
Posts: 29

Crosstab Sorting issue

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
SAS Employee
Posts: 67

Re: Crosstab Sorting issue

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

Ask a Question
Discussion stats
  • 1 reply
  • 455 views
  • 4 likes
  • 2 in conversation