Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
egoss_cynosure_
Contributor II
Contributor II

Sorting in Pivot Table

Does anyone know why a pivot table wouldn't sort correctly using an expression?

The two tables below use the same expression to sort the dimension. The straight table sorts correctly while the pivot table doesn't. The sort works on all dimensions except for one, which is the one I need to show in the pivot.

Pivot TablePivot TableStraight TableStraight Table

 The 'variable' in this case is from the variable extension (button)

=if($(variable)= 'All',
Sum({$<[(Y/N)] = {'Company1', 'All Others'}, [X or Y] = {'X'}, [Recent] = {'Y'}>}[Vol])
,
if($(variable)= 'All Others',
Sum(({$<[(Y/N)] = {'All Others'}, [X or Y] = {'X'}, [Recent] = {'Y'}>} [Vol])
,
Sum({$<[(Y/N)] = {'Company1'}, [X or Y] = {'X'}, [Recent] = {'Y'}>} [Vol])
))

Thank you in advance!

Labels (3)
0 Replies