8 Replies Latest reply: Jun 6, 2014 2:19 PM by Jacob Kean

# Percent change in bar chart

I have a bar chart which shows sales by year. Each bar is a simple Sum(Sales) expression.

As a value on the data point, I want to not only display the dollar amount, but also the percentage change from the last year.

So if my sales were: 2012 = 50, 2013 = 75, 2014 = 60, I'd want to see the following three values over each bar:

\$50 / N/A     \$75 / +50%     \$60 / -20%

I have created a 2nd expression and disabled bar, kept show value on data point, but I'm not quite getting the right set analysis and formula to get the correct percentage to show.

Any ideas?

• ###### Re: Percent change in bar chart

Try similar to the below expression to get both the % and \$ amount in the chart

dual(Sum({<Date={'2012','2013','2014'}>}Sales)&' ('& num(Sum({<Date={'2012','2013','2014'}>}Sales)/Sum(sales),('##%'))& ')',

Sum({<Date={'2012','2013','2014'}>}Sales)+(Sum({<Date={'2012','2013','2014'}>}Sales))/100)

• ###### Re: Percent change in bar chart

Do you mean like this

• ###### Re: Percent change in bar chart

sorry I mean this

• ###### Re: Percent change in bar chart

Close! I need the 50% and -20% to be next to the 75 and 60. But the formula you're using in that expression would probably be helpful!

• ###### Re: Percent change in bar chart

You could use a combo chart. Make the bars your normal expression, then add an expression such as:

dual('\$(=(1-above(sum(Sales))/100)),sum(sales))

Make this new expression a dot, and select show values on data points.