Products | Versions |
---|---|
Spotfire Analyst | All |
Often there is the need to reorder the values in visualizations in TIBCO Spotfire so that they appear in a specific required order. For example, it might be needed to re-order the values in the "Color by" axis on the legend, the order of stacked or side-by-side bars in Bar Charts, or the order of values in headers in Cross Tables and other locations.
The order of all of these values in visualizations is determined by the sort order of the particular column (Integer columns use the ascending numerical sort order, string columns use alphabetical, etc). Each data type has its own default sort order, but for strings you can also define custom sort orders where you can manually order the values in any order desired.
To do this, define your own custom sort order for the column in the Custom Sort Order dialog:
Note: The Custom Sort Order feature is only available for columns of data type String, so all other data types will always be sorted using their own standard sort order and will not have the option to apply a custom order. To define a custom sort order based on columns with such non-String data types, create a calculated column which converts the value from the original column into a String, then use that new String column in the visualization. To do this you can create a new calculated column with an expression that uses the String() function, such as:
String([myOriginalColumn])
Then you can create a custom sort order on your new calculated column which you then use in visualizations.
Note: The Custom Sort Order dialog is only available in the TIBCO Spotfire installed client (Analyst/Desktop) - not in the web client.
Details on Column Properties – Sort Order
Details on Custom Sort Order