Sort Order
To customise the sorting order of grouped entries, a sort order can be specified in the grouping expression itself. This might be needed if the default (alphanumerical) order does not suffice, for example:
April |
August |
December |
February |
January |
July |
June |
March |
May |
November |
October |
September |
or
High |
Low |
Medium |
The grouping value returned by expressions can be specified with a delimiter, to control the value used for grouping/sorting separately to the display value. For example, if an expression returns "0;Low", this would mean that it would be grouped/sorted by "0" but displayed as "Low".
The examples shown in the tables above might be written as:
=MONTHNAME(Date)
and
=if(AU < 200) then "Low" elseif(AU < 500) then "Medium" else "High" endif
To control the ordering, you could instead write the following:
=#MONTH(Date) + ";" + MONTHNAME(Date)
and
=if(AU < 200) then "0;Low" elseif(AU < 500) then "1;Medium" else "2;High" endif
Which would sort the months in chronological order, and sort Low-to-Medium-to-High, respectively.