Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
hopkinsc
Valued Contributor II

Sorting in a Pivot

Hi all.

I have a pivot table that i am trying to sort, i know sorting a pivot inst as easy as sorting a straight table and have tried to do it but can't get it to work. I guess its not possible but thought i'd ask her instead. 

Basically, i have the month/year pivoted and i want to sort it by the expression descending.

Capture.JPG

 

so in the above i would want the 8.8 at the top of Nov 2018, I'm not interested in how the rest of the months are sorted, it just needs to be latest month. 

I have attached an example. 

Thanks

1 Solution

Accepted Solutions

Re: Sorting in a Pivot

Something like this?

image.png

6 Replies

Re: Sorting in a Pivot

Something like this?

image.png

hopkinsc
Valued Contributor II

Re: Sorting in a Pivot

Hi,

Thanks for the reply. 

That's correct but its taking the Manager into consideration too. What i want is for it to just sort on Assigned User. 

I have exported what you have done into excel and sorted the column there, so what i want is in the attached (i dont care about the nulls, so they can stay there)

 

Re: Sorting in a Pivot

In that case convert this into a straight table... because Pivot table groups the rows by the dimension above it. Which means all users who have the same Manger will come as a same chunk. The same is not the problem with a straight table Smiley Happy

Best,
Sunny
hopkinsc
Valued Contributor II

Re: Sorting in a Pivot

Yes that's what i thought, i just wasn't sure if there was a way to overcome that by some fancy syntax Smiley Happy

I will use your previous example though, and the user can drag the Manager column to the right so it appears after the Assigned User column, that will then give them the result they are looking for. 

 

Thanks for your help Smiley Happy

Re: Sorting in a Pivot

Yes, that is def. one option... or this using straight table

image.png

hopkinsc
Valued Contributor II

Re: Sorting in a Pivot

Yes, i will inform the users of the straight table option, the only issue with that is i guess as their data grows they will have more months. 

Thanks very much for your help anyway, appreciated Smiley Happy

Community Browser