Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
cliff_clayman
Creator II
Creator II

Force scale on a bar chart

I have a bar chart with a reference line to represent a target.  However, when my values are below the target line value, the target line is no longer shown.  How can I force the scale to always show my reference line no matter what the other values are?

Capture.JPG

Capture.JPG

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

On the Axis tab, you can set "Static Max" to force the top end of the scale. You can use an expression to make the max dynamic, for example. to never go below the reference line, but to go higher if higher values are present.  Assume Sales by Product with a ref line at 10k.

=RangeMax(10000, max(aggr(sum(Sales), Product)))

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

cliff_clayman
Creator II
Creator II
Author

My issue is that each line on the bar chart represents it's own expression.  How do I make the scale work for each expression?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Do you mean you have multiple reference lines?  Can you post a picture?

-Rob

cliff_clayman
Creator II
Creator II
Author

No, just one reference line.  The target remains the same.  Maybe there's a better way to do it?

Capture.JPG

Capture2.JPG