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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
andy
Partner - Creator III
Partner - Creator III

How can I sort this pivot on the values in the first column only?

I just cannot find out how I should make this pivot table sort the way I want.

The customer with the largest value in column "Head1" shall be first and then the customer with the second largest value in column 'Head2'

Any suggestions to solve this without having to calculate the values for each column in separate fields in the load script?

brgds

Andy

1 Solution

Accepted Solutions
eric_dielessen
Partner - Contributor III
Partner - Contributor III

Try the following as sort expression for the CUSTOMERS.NAME field and select Descending order.

sum({$ <HEADERS.Text = {Head1}>} Value)



Hope this helps.

Kind regards,

Eric



View solution in original post

3 Replies
eric_dielessen
Partner - Contributor III
Partner - Contributor III

Try the following as sort expression for the CUSTOMERS.NAME field and select Descending order.

sum({$ <HEADERS.Text = {Head1}>} Value)



Hope this helps.

Kind regards,

Eric



andy
Partner - Creator III
Partner - Creator III
Author

Ah finally I found a way!

I added this as the expression to sort on for the CUSTOMER.NAME dimension

=sum(if(KONTOKOD='A1' OR KONTOKOD='A7' OR KONTOKOD='L1' OR KONTOKOD='M1', Value))

/Andy

andy
Partner - Creator III
Partner - Creator III
Author

I didn't noticed Erics solution until I found my workaround and posted that one. Eric's solution is the same thing written in another way, a simpler way. Thanks!

/Andy