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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sort Dimension in Pivot

Hello,

I need the [order index] (last dimension in pivot) to sort in ascending order. If I promote this dimension to the top it will sort, but I need this granular level in my pivot table. Any suggestions? Attached is the QVW.

Thank you,

EK

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

In your example, it is enough to move it one step up, before "Sec Diag".  Or, sort "Sec Diag" by expression "order Index"

Regards,

Michael

View solution in original post

3 Replies
Anonymous
Not applicable
Author

In your example, it is enough to move it one step up, before "Sec Diag".  Or, sort "Sec Diag" by expression "order Index"

Regards,

Michael

Not applicable
Author

I have neve done the sort by expression that worked. Thank you! Another question I am have is how to include OR logic into an expression or script based on a current selection. Say I want a acct number to be shown if it is in the [Prim Diag] field or the [Sec Diag] field. The Diag code would be the search selection.

Thanks again,

EK

Anonymous
Not applicable
Author

You cannot refer to "current selection" in script - during the reload, selections do not exist.  You can though keep info about last selection in a variable, and variables can be used in the script.

Using selection in expression - by deafult expressions take selections into account.  In some cases you want to override it using set analysis.

Anyway, you better open a new discussion for that (more people will read), and try to be more specific 🙂

Regards,
Michael