Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sorting an expression in Descending order

Hi Guys,

Can someone help me sort the expression named "instances" in this case in descending order for every month in a chart. There are 2 Dimensions namely "Month" & "Configuration Color".

Attaching the test qvw file + test table file

Thanks

8 Replies
Kushal_Chawda

try this sort option

Not applicable
Author

I already tried this in different variations! it doesn't work. Tried the "expression" in the sort tab as well!

swuehl
MVP
MVP

Maybe have a look at this thread, if this fulfills your requirements:

Sort Stacked Chart by Y and 2nd Dimension

sunny_talwar

Brilliant. I just tried with this as a calculated dimension (similar to Marco's response) and it worked like a charm. I am amazed how you guyz make it so simple

=Dual([Configuration Color], Aggr(instances, Month, [Configuration Color]))


Capture.PNG

swuehl
MVP
MVP

Yeah, but one remaining issue is that the color legend and the colors are now showing distinct values per combination of Month and Configuration Color. Marco solved this by using a custom coloring and a separate color legend chart  instead of using the bar chart's one.

It would be nice if QV would offer a more simple way of changing the sort order in a stacked bar chart.

For example, it's quite easy to create the correct sort order in a straight table chart.

Not applicable
Author

Thanks a lot guys! This helped !

Not applicable
Author

Thanks sunny. This worked just fine for me.

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer.

If not, please make clear with what part of this topic you still like help .

May you live in interesting times!