Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
Pri_07_03
Partner - Contributor III
Partner - Contributor III

Straight table sorting order differs between Excel and Qlik Sense despite identical multi-level sort configuration

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 - 

  • 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?

Labels (5)
3 Solutions

Accepted Solutions
avinashelite
MVP
MVP

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 

View solution in original post

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

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:

Lech_Miszkiewicz_0-1781087074609.png

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

abc_09
Contributor
Contributor

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.

View solution in original post

9 Replies
robert_mika
MVP
MVP

Ca you post an example with screenshot from bothsources?

avinashelite
MVP
MVP

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 

Pri_07_03
Partner - Contributor III
Partner - Contributor III
Author

Hi,

 

I recreated the issue using a simple dummy dataset.

 

Sorting applied:
Year (descending) → Month (descending) → Department (descending) → Product Name (ascending)

 

Excel Output:
Year | Month | Department                  | Product Name     | Category
2025 | 12    | Dept-C Security Systems     | Prod-Access A    | FSP
2025 | 12    | Dept-C Security Systems     | Prod-Access B    | FSP
2025 | 12    | Dept-B Wireless Network     | Prod-Wifi A      | FSP
2025 | 12    | Dept-B Wireless Network     | Prod-Wifi B      | FSP
2025 | 12    | Dept-A CATV Systems         | Prod-CATV A      | FSP

 

 

Qlik Output:

Year | Month | Department                  | Product Name     | Category
2025 | 12    | Dept-B Wireless Network     | Prod-Wifi A      | FSP
2025 | 12    | Dept-B Wireless Network     | Prod-Wifi B      | FSP
2025 | 12    | Dept-C Security Systems     | Prod-Access A    | FSP
2025 | 12    | Dept-C Security Systems     | Prod-Access B    | FSP
2025 | 12    | Dept-A CATV Systems         | Prod-CATV A      | FSP

 

 

In Excel, the data starts with Dept-C Security Systems,
whereas in Qlik, the data starts with Dept-B Wireless Network,
even though the same sorting logic is applied.

 
About Chart Dimension :

The dimension is conditional and changes visibility depending on selection state.
It has separate logic for:
- when a bar is clicked
- when list/table filters are applied
- when no selection / single FY / multiple FY are selected

 

 

Could you please help explain why this difference occurs and how we can achieve the same order as Excel in Qlik?

 

Pri_07_03
Partner - Contributor III
Partner - Contributor III
Author

Hi,

 

I recreated the issue using a simple dummy dataset.

 

Sorting applied:
Year (descending) → Month (descending) → Department (descending) → Product Name (ascending)

 

Excel Output:
Year | Month | Department                  | Product Name     | Category
2025 | 12    | Dept-C Security Systems     | Prod-Access A    | FSP
2025 | 12    | Dept-C Security Systems     | Prod-Access B    | FSP
2025 | 12    | Dept-B Wireless Network     | Prod-Wifi A      | FSP
2025 | 12    | Dept-B Wireless Network     | Prod-Wifi B      | FSP
2025 | 12    | Dept-A CATV Systems         | Prod-CATV A      | FSP

 

 

Qlik Output:

Year | Month | Department                  | Product Name     | Category
2025 | 12    | Dept-B Wireless Network     | Prod-Wifi A      | FSP
2025 | 12    | Dept-B Wireless Network     | Prod-Wifi B      | FSP
2025 | 12    | Dept-C Security Systems     | Prod-Access A    | FSP
2025 | 12    | Dept-C Security Systems     | Prod-Access B    | FSP
2025 | 12    | Dept-A CATV Systems         | Prod-CATV A      | FSP

 

 

In Excel, the data starts with Dept-C Security Systems,
whereas in Qlik, the data starts with Dept-B Wireless Network,
even though the same sorting logic is applied.

 
About Chart Dimension :

The dimension is conditional and changes visibility depending on selection state.
It has separate logic for:
- when a bar is clicked
- when list/table filters are applied
- when no selection / single FY / multiple FY are selected

 

 

Could you please help explain why this difference occurs and how we can achieve the same order as Excel in Qlik?
N30fyte
Creator
Creator

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:

Screenshot 2026-06-10 102427.png

The correct alphabetical sort order is:

Q251718
Q251718
Q2518
Q2531
Q253334
Q2540


Excel gets this right. Q251718 is alphabetically before Q2518.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

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:

Lech_Miszkiewicz_0-1781087074609.png

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
JuliaSimpson
Contributor
Contributor


@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.

Or
MVP
MVP

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. 

abc_09
Contributor
Contributor

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.