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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sorting Pivot Table

Dear Qlik Community,

I want to sort my Pivot Table by "Total delayed PO lines >1 w".

I'm sorting Vendor nr by the expression I used to calculate ""Total delayed PO lines >1 w".

Count( {$<[Performance detailed]={'e. Overdue 1m','f. Overdue >1m'}>} [Vendor nr] )

Unfortunately that doesn't seem to do the trick. What am I missing here?

See attachment for print screen.

10 Replies
agigliotti
Partner - Champion
Partner - Champion

let's try to apply the same order by expression also for "Category descr" dimension.
avkeep01
Partner - Specialist
Partner - Specialist

Hi @Anonymous, 

 

You could try to aggregate over the caterogy dimensions, so it sorts the vendors within the category. 

AGGR(Count( {$<[Performance detailed]={'e. Overdue 1m','f. Overdue >1m'}>} [Vendor nr] ),[Category desc])
Anonymous
Not applicable
Author

Hi @avkeep01,

Thx for your reply.

I tried it but no succes.

Anonymous
Not applicable
Author

Hi @agigliotti,

I did as you told but no succes.

agigliotti
Partner - Champion
Partner - Champion

be sure to untick "Sort numerically" and "Sort alphabetically" options under Sort by expression.
it should works.
avkeep01
Partner - Specialist
Partner - Specialist

Hi Tom, 

recreated your example and sorting by expression worked fine.

Sum([Total delayed PO lines])

The thing is that I didn't use the part from the set analysis. Mabye you could bring that part to the script and created the same field as I mentioned. 

 

agigliotti
Partner - Champion
Partner - Champion

or try the below expression:
Aggr( Count( {$<[Performance detailed]={'e. Overdue 1m','f. Overdue >1m'}>} [Vendor nr] ) [Category desc], [Vendor nr] )
Anonymous
Not applicable
Author

Hi @agigliotti@avkeep01,

Still no luck. For convenience I created and attached a sample qvf.file.

As I was not able to upload it via the forum due to error "The contents of the attachment doesn't match its file type." I uploaded it to WeTransfer.

https://we.tl/t-nERN0FTTru

Anonymous
Not applicable
Author


@avkeep01 wrote:

Hi Tom, 

recreated your example and sorting by expression worked fine.

Sum([Total delayed PO lines])

The thing is that I didn't use the part from the set analysis. Mabye you could bring that part to the script and created the same field as I mentioned. 

 


Hi @avkeep01,

I tried bringing my expression to the load script but ran into an error. Could you have a look?