Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Straight table sorting order differs between Excel and Qlik Sense despite identical multi-level sort configuration
I have implemented sorting in a Qlik Sense straight table with the following order:
Year (descending) → Month (descending) → Product Category (descending) → Solution Name (descending) → Product Name (ascending) → Call Number (descending)
The same sorting logic has been applied in Excel using multi-level sort for validation. However, the row order in Excel does not match the order displayed in Qlik Sense.
In Qlik Sense, the sorting is applied at the dimension level in the straight table properties, while Excel I have applied this -
Could someone clarify:
Why does Qlik Sense sorting order sometimes not match Excel sorted output even when the same hierarchy is used?
If you have multiple dimension in the chart , Qlik always try to sort based on the first dimension or the order in the sort section . Sometime if your dimensions are not fully numeric/date format , it will cause issue.
Share the sample data illustrating the issue, we will try to help
you are right - Qlik is not using true ASCI sorting in this instance.
If your potential string is short then you could build a sorting expression by using true asci codes for individual characters and then sort those by
=Ord(code)
&'|'&Ord(Mid(code,2,1))
&'|'&Ord(Mid(code,3,1))
&'|'&Ord(Mid(code,4,1))
&'|'&Ord(Mid(code,5,1))
&'|'&Ord(Mid(code,6,1))
&'|'&Ord(Mid(code,7,1))
&'|'&Ord(Mid(code,8,1))
&'|'& etc.....
like so:
In Qlik Sense, this sorting is applied at the visualization layer based on the data model and dimension evaluation, not as a physical row order like Excel. Therefore, Excel row order may not always visually match Qlik because Excel uses static row sorting while Qlik uses dynamic, expression-based sorting in charts.
However, the Qlik straight table is correctly configured according to the business requirement, and the displayed order reflects the defined sorting logic within Qlik’s associative model.
Ca you post an example with screenshot from bothsources?
If you have multiple dimension in the chart , Qlik always try to sort based on the first dimension or the order in the sort section . Sometime if your dimensions are not fully numeric/date format , it will cause issue.
Share the sample data illustrating the issue, we will try to help
About Chart Dimension :
About Chart Dimension :
Just to add another very simple example of how Qlik Sense gets this wrong:
alphabetic:
Load * Inline
[code,somenumber
Q2518,12
Q2531,14
Q2540,17
Q251718,11
Q251718,13
Q253334,10]
;
Create a straight table from this data using both values as dimensions. Sort alphabetically on code:
The correct alphabetical sort order is:
| Q251718 |
| Q251718 |
| Q2518 |
| Q2531 |
| Q253334 |
| Q2540 |
Excel gets this right. Q251718 is alphabetically before Q2518.
you are right - Qlik is not using true ASCI sorting in this instance.
If your potential string is short then you could build a sorting expression by using true asci codes for individual characters and then sort those by
=Ord(code)
&'|'&Ord(Mid(code,2,1))
&'|'&Ord(Mid(code,3,1))
&'|'&Ord(Mid(code,4,1))
&'|'&Ord(Mid(code,5,1))
&'|'&Ord(Mid(code,6,1))
&'|'&Ord(Mid(code,7,1))
&'|'&Ord(Mid(code,8,1))
&'|'& etc.....
like so:
@Pri_07_03 wrote:
Straight table sorting order differs between Excel and Qlik Sense despite identical multi-level sort configuration
I have implemented sorting in a Qlik Sense straight table with the following order:
Year (descending) → Month (descending) → Product Category (descending) → Solution Name (descending) → Product Name (ascending) → Call Number (descending)
The same sorting logic has been applied in Excel using multi-level sort for validation. However, the row order in Excel does not match the order displayed in Qlik Sense. mariniostvv
In Qlik Sense, the sorting is applied at the dimension level in the straight table properties, while Excel I have applied this -
- Select your entire dataset
- Go to Data → Sort
- Click Add Level
Could someone clarify:
Why does Qlik Sense sorting order sometimes not match Excel sorted output even when the same hierarchy is used?
This difference is expected because Qlik does not sort data in the same way as Excel. In Qlik, sorting is driven by the associative model, expressions, and data types rather than simple row-based ordering.
If you want a behavior closer to Excel, you may need to adjust the sorting settings in the straight table (dimension or measure sorting) and explicitly define numeric or text sorting where needed.
This isn't 'wrong', it's just not alphanumeric sorting. Qlik uses mixed-sorting for strings that contain numbers, by design.
@Lech_Miszkiewicz has provided the workaround for this. Another alternative is to pre-sort the data during load (Order By) and then use the load order to sort the table.
In Qlik Sense, this sorting is applied at the visualization layer based on the data model and dimension evaluation, not as a physical row order like Excel. Therefore, Excel row order may not always visually match Qlik because Excel uses static row sorting while Qlik uses dynamic, expression-based sorting in charts.
However, the Qlik straight table is correctly configured according to the business requirement, and the displayed order reflects the defined sorting logic within Qlik’s associative model.