# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

## Accumulation Line Chart can not stop to current month

Hello Everyone,

I need create a line chart compare goal and actual. The goal goest to year end and actual is just to current month. After I finish this line chart, the actual line continue to year end. Can you help?

Dust

1 Solution

Accepted Solutions
MVP

## Re: Accumulation Line Chart can not stop to current month

You can check on the current value and stop the line like

=if(sum ( {\$<[Ops Month] = {"<=\$(vOpsReviewMonth)"}>} [Revenue-Actual]),

rangesum(

sum ( {\$<[Ops Month] = {"<=\$(vOpsReviewMonth)"}>} [Revenue-Actual]),

above("Actual")

))

[you can also check on the current Month instead of the Value, if the Actual might be zero for some month]

You can also hide the line after a certain point using a appropriate background color.

See attached.

Hope this helps,

Stefan

11 Replies
MVP

## Re: Accumulation Line Chart can not stop to current month

Hi

I assume that you are using full acumulation on the chart. Rather than doing that, use an expression like

=RangeSum(Above(Sum(Sales), 0, RowNo()))

Depending on your data model, that should do the trick...

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable

## Re: Accumulation Line Chart can not stop to current month

Thank you, Jonathan.

I tried RangeSum and full acumulation both methods.  I get the same result. I load two crosstab table both Goal and Actual and joined with Company and Month.

The actual line should stop at current month. The one I have doesn't make any sense.

Thanks,

Dust

MVP

## Re: Accumulation Line Chart can not stop to current month

I suggest that you post your app - something in the model or expression is making it see zero values rather than missing values for the future months. Bear in mins that a sum() of nulls is 0, nor null.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable

## Re: Accumulation Line Chart can not stop to current month

Hi Jonathan,

Thank you very much for your help. Please see attached test file. Your help is greatly appreciated.

Thanks,

Dust

Not applicable

## Re: Accumulation Line Chart can not stop to current month

Thank you very much, Joanathan.

Please see attached testing file. It may give you more sense. Your help is greatly appreciated.

Dust

MVP

## Re: Accumulation Line Chart can not stop to current month

You can check on the current value and stop the line like

=if(sum ( {\$<[Ops Month] = {"<=\$(vOpsReviewMonth)"}>} [Revenue-Actual]),

rangesum(

sum ( {\$<[Ops Month] = {"<=\$(vOpsReviewMonth)"}>} [Revenue-Actual]),

above("Actual")

))

[you can also check on the current Month instead of the Value, if the Actual might be zero for some month]

You can also hide the line after a certain point using a appropriate background color.

See attached.

Hope this helps,

Stefan

Not applicable

## Re: Accumulation Line Chart can not stop to current month

Stefan, Thank you very much. You answer is excetly what I need I pluge on my testing file it works perfectly. I still need add your code to my prod one.

Best regards,

Dust

Not applicable

## Re: Accumulation Line Chart can not stop to current month

Stefan,

Can you write another code for month? based on your code, we need let chart show accumulation amoumt to the reviewmonth.