4 Replies Latest reply: Sep 12, 2011 4:53 PM by John Witherspoon

# Chart: top and bottom 3 values on bars

I have a bar chart to display with >20 bars on 320x480 pixels (limited by screen of an iPhone 3G). It would be better to show values on the bars (values on data points), too. But values have 6digits each and are overlapping each other.

I would like to display all >20 bars, but in a way that only 6 of bars (top 3 and bottom 3) would have values on data points - how to do this?

• ###### Chart: top and bottom 3 values on bars

Hi,

You can use a combo chart and add a second expression. On this second expression untick the bar, and line options but tick the Values on data point box. This will remove the line and bar but sit a number on top of your first expression bar.

You can then use an expression like the one below (this one will just put the value on the top 3 bars).....

if(match(rank(sum([Sales Qty])),1,2,3),sum([Sales Qty]))

You can incorporate something like if(rank(exp) > Max(rank(exp)-3)........ etc to get the bottom three values.

Cheers.

Ad.

• ###### Chart: top and bottom 3 values on bars

Alternatively you could use the "Show Value" subexpression instead of putting "Values on Data Points" for the full expression with an expressions similar to the one suggested above.

• ###### Chart: top and bottom 3 values on bars

Thank you for your help

How to use "Show Value" subexpression?

"Values on data Points" puts 3 values on top bars and "-" to all others. Those lines should not be there...

• ###### Re: Chart: top and bottom 3 values on bars

The '-' is probably just how it is displaying null since the if() doesn't have an else.  You can probably just add an else that evaluates to a space as one way of removing the '-'s.

if(match(rank(sum([Sales Qty])),1,2,3),sum([Sales Qty]),' ')