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 Stacked Chart

I have a chart with the following Dimensions:

Photo 1.JPG.jpg

My Expression is: 

Sum(FreightCosts)

My graph looks like:

Photo2.JPG.jpg

I want it to sort the lowest value on top (Misc) and Highest on bottom (Freight).  I have tried everything and can't get it to work.

Please help.

1 Solution

Accepted Solutions
MarcoWedel

Hi Amanda,

one solution might be to use Sum(FreightCosts) as a sorting expression as well. The order can be defined once for the whole chart, not per bar though, i.e. the order is defined by the total costs per category:

QlikCommunity_Thread_139471_Pic1.JPG.jpg

QlikCommunity_Thread_139471_Pic3.JPG.jpg

QlikCommunity_Thread_139471_Pic2.JPG.jpg

hope this helps

regards

Marco

View solution in original post

6 Replies
MarcoWedel

Hi Amanda,

one solution might be to use Sum(FreightCosts) as a sorting expression as well. The order can be defined once for the whole chart, not per bar though, i.e. the order is defined by the total costs per category:

QlikCommunity_Thread_139471_Pic1.JPG.jpg

QlikCommunity_Thread_139471_Pic3.JPG.jpg

QlikCommunity_Thread_139471_Pic2.JPG.jpg

hope this helps

regards

Marco

Not applicable
Author

The SUM Freight function still isn't working.  Here is what it looks like now:

Capture.JPG.jpg

The Red section (Misc) is now all over the place.

ashfaq_haseeb
Champion III
Champion III

Hi go to sort tab and select sort by y value ascending for both dimensions.

Regards

ASHFAQ

morganaaron
Specialist
Specialist

Hi Amanda,

Try using =Rank(Sum(FreightCosts)) for the expression for Category in the sort tab and set to Ascending.

Not applicable
Author

Okay... so the Sum(FreightCosts) is actually working.  I reviewed my data, and apparently some of my freight (misc) is negative. 

SO, it is sorting correctly!

Thanks All.

Amanda

Not applicable
Author

Amanda i see that you are new here so please take the time to mark Marco's answer as correct answer