Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

crystles
Contributor III

Show Increase/Decrease over yrs in chart

I have a bar chart with a Dimension of Years, and an Expression of Sum(cost)

I want to have a value on a line, over the bars, that shows how the bar values (Sum of costs for each year) increases each year.

So say, for 2009 I have $100 for 2010 I have $400 and for 2011 I have $600.

YearsSum of CostIncrease/DecreaseLogic for Increase/Decrease Formula
2009$100$0None - 2009
2010$400$3002009 - 2010
2011$600$2002010 - 2011

I feel like there should be a simple answer, but I cant seem to think of a simple formula to achieve the desired output as an expression.

Any help would be greatly appreciated. Thanks!

1 Solution

Accepted Solutions
mark6505
Valued Contributor III

Re: Show Increase/Decrease over yrs in chart

HI,

It could be possibly just need to the Sum the value in the above function?

Sum(Cost)-Above(Sum(Cost))

Mark

5 Replies
mark6505
Valued Contributor III

Re: Show Increase/Decrease over yrs in chart

Hi,

Add another expressions,

Sum(Cost)-Above(Cost)

Mark

crystles
Contributor III

Re: Show Increase/Decrease over yrs in chart

I tried the formula and it doesn't show an error, but the chart doesn't show the values for that formula for some reason?

Re: Show Increase/Decrease over yrs in chart

Have you made selections in the Year field or even without the selection the result is not the one desired?

mark6505
Valued Contributor III

Re: Show Increase/Decrease over yrs in chart

HI,

It could be possibly just need to the Sum the value in the above function?

Sum(Cost)-Above(Sum(Cost))

Mark

crystles
Contributor III

Re: Show Increase/Decrease over yrs in chart

Yes, that worked. It needed the value to be summed in order to calculate the above().

Thank you!

Community Browser