Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
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
mov
Esteemed Contributor III

Re: 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

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

Re: 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

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
Contributor III

Re: 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

Can you try with a conditional expression in Rank?

mov
Esteemed Contributor III

Re: 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

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

Not applicable

Re: 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

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 ?

mov
Esteemed Contributor III

Re: 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

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

Highlighted
Not applicable

Re: 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

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.

mov
Esteemed Contributor III

Re: 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

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