Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW

Sorting not working as expected when fields with the same name are used in a Pivot table

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Sonja_Bauernfeind
Digital Support
Digital Support

Sorting not working as expected when fields with the same name are used in a Pivot table

Last Update:

May 10, 2022 3:23:50 PM

Updated By:

Jamie_Gregory

Created date:

Dec 29, 2017 10:23:47 AM

Attachments

Sorting is incorrect when a user tries to sort with the second dimension. This happens in the case where 2 nested levels contain the same field name.

 

Environment:

QlikView 
Qlik Sense Enterprise on Windows 
Qlik Cloud 
Qlik Sense Business 

 

Using the attached sample app, the pivot table has 2 nested levels contain the same field name: 'Income'.

If a user tries to sort with 'dimb' using 'dimbnum' in an expression. The sort works as expected for nested group 'A', but it works incorrectly for group 'B'.
It seems like 'Income' for group ' B' is ignored and the 'Income' in group 'A' is used in both groups.

Steps to reproduce:

  1. open attached app
  2. compare details in group 'B' of pivot table on the upper-left to sorted table below.
  3. Notice that 'Cost B' comes before 'Income', but that is not reflected in the Pivot table
  4. test by changing the 'dimbnum' Value for 'Income' under 'A' in the attached excel file and reload the data to the app. notice the change under 'B'

This is working as designed. In the pivot table dima will be sorted before dimb, income will get the value 5000 (when sorted by the expression dimbnum) which is used when dimb is sorted, hence the last position in the sorted table.

Resolution:

 

  • Rename one of the Income fields.
    or
  • Use an aggregation in the sort expression such as 'max(dimbnum)'.
Labels (1)
Version history
Last update:
‎2022-05-10 03:23 PM
Updated by: