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

How to define dimensions or expressions in a bar chart so it displays one dimension but is sorted by another dimension which is not displayed

Hi

Relatively new to Qlikview and having problem setting up some simple chart formats.

I have a scenario with a table with 3 fields/columns.

FNumber, Rank, Value

FNumber is like a unique record identifier in this case and rank is determined by the value.

I want to create a bar chart displaying the Value as bar for each FNumber, but sorted by Rank.

The chart seem to allow only sorting for exiting Dimensions and not expressions.

The problem:

  • if i define FNumber as dimension and Value as Expression, There doesn't seem to be an option to sort by Ranking.
  • if i define Rank as dimension and Value as Expression, any duplicated rank is not shown, only unique rank numbers display a bar value.


Is there an alternative way to approach this that I'm not seeing ?


Thanks.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

If you define FNumber as dimension and Value as Expression, you still can sort by Rank.  To be exact, you sort by dimension FNumber - but use sort order "by Expression" (see Sort tab), and Expression is

=Rank

You can choose Ascending or Descending.

Regards,

Michael

View solution in original post

7 Replies
Not applicable
Author

If defining  Rank as dimension and Value as expression  you work a but does not show duplicate values ​​only checkbox is not accumulating values ​​and to allow all values ​​in the dimension

javier_florian
Creator III
Creator III

Can you try with a conditional expression in Rank?

Anonymous
Not applicable
Author

If you define FNumber as dimension and Value as Expression, you still can sort by Rank.  To be exact, you sort by dimension FNumber - but use sort order "by Expression" (see Sort tab), and Expression is

=Rank

You can choose Ascending or Descending.

Regards,

Michael

Not applicable
Author

Thanks Michael, This is exactly what i was looking for.

follow up question,

Although I can use FNumber as the dimension, the bar displayed in the chart has the pop up description of FNumber, is there a way to changed it to display Rank as originally intended ?

Anonymous
Not applicable
Author

It also possible.
First, use combo chart, not the bar chart.  For you main expression (Value) use display option "Bar".
Next, create another expression for Rank. Define it as
'Rank=' & Rank
Uncheck all display options (Bar, Symbol, Line) but check "Text as Pop-up".
I hope it gives you what you need.

Regards,
Michael

Not applicable
Author

Thanks, though i figure out a solution already,

Similar to your suggestion, but sticking with the Bar chart, i disabled pop up in the presentation tab and add all the custom expression(removing bar option)  and enabled the 'text as pop up' option for them.

Anonymous
Not applicable
Author

That's good - you'll remember what you do yourself better than any responses here