Do you have all that expression within the Sort expression. Never seen that much logic in there and suspect QlikView could have problems with this as it would need to process the logic for each record in the list box.
See if you can apply this logic within the script. Perhaps you can load another table linked to the field. For instance, I wanted to show the last 12 months in a chart, so I linked another table to my Calendar called MonthSort. In this table I loaded in 12 fields called MonthSort1 to MonthSort12, and a link back to the calendar's Month field as follows:
Month MonthSort1 MonthSort2 MonthSort3 MonthSort4 etc.
Jan 1 12 11 10
Feb 2 1 12 11
Mar 3 2 1 12
Apr 4 3 2 1
I could then add MonthSort2 into the Sort expression when the months started with February, which would show January last (ass it's MonthSort value was 12).
Your example might not be as complicated, with just three options.of Business Divisions.
Thanks for the response Jonathan,
I've loaded a "INLINE" table for the sorting, used a dual function(Business_Division, Business_Division_SortOrder) as the dimension(expresion) and used the Business_Division_SortOrder field in the sort expression as below .
This has worked perfectly as needed.
LOAD * INLINE [
'Head Office', 4
'Shared Services', 5
'Natal Witness Group', 7
'Paarl Coldset', 10