Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sort by Expression for the second dimension in grouped bar chart

I have a grouped bar chart with two dimensions in QlikSense. The first dimension is 'YEAR', so that gets easily sorted numerically.

The second dimension has string values and I need that in a specific order against the years. I have tried using functions like DUAL, MATCH, IF but nothing has worked out so far. However, if I filter out a specific YEAR, the sorting seems to work as desired (with MATCH function). Can anyone tell me what I'm doing wrong here? Thanks!

1 Solution

Accepted Solutions
rittermd
Master
Master

When I need a specific order and there are not a lot of values I create an inline table like this:

Funnel:

LOAD * INLINE [

StageName,SortOrder

Qualify,1

Develop,2

Proposed,3

Closing,4

];

The field StageName needs to be the same name as the field in the table that contains these values.

Then Sort by expression and sort on the SortOrder field.

This is a great trick especially when your values have ranges or > < in the values.

View solution in original post

2 Replies
rittermd
Master
Master

When I need a specific order and there are not a lot of values I create an inline table like this:

Funnel:

LOAD * INLINE [

StageName,SortOrder

Qualify,1

Develop,2

Proposed,3

Closing,4

];

The field StageName needs to be the same name as the field in the table that contains these values.

Then Sort by expression and sort on the SortOrder field.

This is a great trick especially when your values have ranges or > < in the values.

NZFei
Partner - Specialist
Partner - Specialist

What is the Sense version you are using?

I have discussed this here Qlik Sense bar chart legend sort required (at the bottom). It helped that guy sort out the problem but not 100% sure if it works for you. I hope it can help though.

Fei