Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sorting by 2nd dimension and expression`

In the attached example, I have a simple chart with 2 dimensions (Project, Responsible) and 1 expression (End Date).  How can I sort the chart by Responsible and then End Date?  The goal is to present each Responsible person's projects together, sorted by End Date. I do have to keep the bars stacked to prevent unwanted gaps. 

I tried sorting by expression Responsible (the 2nd dimension) but that causes the sort to fall back to the load order.  The attached file has the chart as well as a picture of what I am trying to get:

chart.jpg

Any help would be greatly appreciated.

Rich

1 Solution

Accepted Solutions
swuehl
MVP
MVP

3 Replies
swuehl
MVP
MVP

Maybe like this?

Not applicable
Author

swuehl,

It works perfectly.  I see how you generated a sort field during the load, and then used it as an expression in the sort tab.  What I don't understand is why sorting by your column worked, but sorting by my column (in the same table) had no effect.  They are both columns in the same table, so why does it ignore mine but like yours?

Great trick, and I will definitely use it elsewhere as well.

Thanks!

R

swuehl
MVP
MVP

AFAIK, sort by expression expects a number returned, as a rank or sort order.

My load script calculates such a number (in a very simple way, which you might need to adapt for e.g. larger numbers of responsible persons).