Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
tomtastic
Contributor II
Contributor II

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 - Master III
Partner - Master III

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

Hi @tomtastic

 

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])
tomtastic
Contributor II
Contributor II
Author

Hi @avkeep01,

Thx for your reply.

I tried it but no succes.

tomtastic
Contributor II
Contributor II
Author

Hi @agigliotti,

I did as you told but no succes.

agigliotti
Partner - Master III
Partner - Master III

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 - Master III
Partner - Master III

or try the below expression:
Aggr( Count( {$<[Performance detailed]={'e. Overdue 1m','f. Overdue >1m'}>} [Vendor nr] ) [Category desc], [Vendor nr] )
tomtastic
Contributor II
Contributor II
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

tomtastic
Contributor II
Contributor II
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?