Sometimes a desired sort order does not follow a natural alpha or numeric sort pattern. For example, there may be project phase names that should appear in charts in this specific order:
One of the Sortby options available in chart properties is “Load Order”.
A specific Load Order for a field can be created by loading a dummy table with the desired order prior to loading the source data. The dummy table “PhaseSort” may be dropped after loading the source data.
// Load a dummy table to establish
// sort order for field “Phase”.
LOAD * INLINE [
// Load the source data
ProjectId, Phase, Amount
FROM projects.qvd (qvd)
// Dummy table no longer needed
DROP TABLE PhaseSort;
3 thoughts on “Establishing a Sort Order”
Thank you so much. I can’t believe this is not a function in the sort tab… Thank you again.
Someone from the Community solved it for my by proposing the Match function.
Is there any reason why you didn’t choose to use it?
The Match() method works, but can be harder to maintain if you have multiple charts or long list of values to maintain.