Custom Sort Order in QlikView

Load Order is very important in QlikView because it defines the default Sort Order of the fields and also default color order for values.

In QlikView the Order of the Values reflects the load Order of the data.

Load Order generally resembles “order of the source data” but it is not always the case.

You can control the order of the values in the field by using Load Inline

In QlikView, when a table is loaded from the Source system, it loads the unique list of values resembling the Order of the source system.

For e.g., i will load Employees table,

LoadEmp_sort

Create a list box and check the Sort order of City

CitySort_orig

Observe the sort order

Emp_tableViewer

Employee table in Table Viewer. Notice the load order of City

We can customized this Load Order and Sort Order of the field ‘City’ by using Load Inline

After using Load Inline, your script will look like following. Don’t forget to drop the Inline table after the Load script because you don’t  need that table and presence of that table may create unnecessary joins.

Custom_CitySort4

Observe Employees table in the Table Viewer and look at the Load Order of the fields. City is loaded first.

City_LoadOrder

Now look at the List box for City. It shows updated Sort Order now

City_NewSortOrder

Load Inline method is a very useful method to customized fields Sort order and also the Load Order.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.