Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Cumulative expression?

Hello,

iam looking for something to calculate cumulative expression for the following requirement, i tried with many options but couldn't succeed.... Please help.

This is my expression for the bar chart:

=((sum(A)-Sum(B))/Sum(A))*100

Iam calculting the cumulative expression as a line in the same chart.

for the first month , the expression is same

=((sum(A) for Jan-Sum(B) for Jan)/(Sum(A) for Jan)*100

for the second month, i want to find the ((sum(A) for Jan, Feb - Sum(B) for Jan,Feb)/(Sum(A) for Jan, Feb))*100

for the third month, i want to find the ((sum(A) for Jan, Feb,Mar - Sum(B) for Jan,Feb,Mar) /  (Sum(A) for Jan, Feb,Mar))*100

Please find the attachment for the qvw file.

Regards

Siva

3 Replies
vgutkovsky
Honored Contributor II

Re: Cumulative expression?

Siva, see attached.

Regards,

Vlad

Not applicable

Re: Cumulative expression?

excellent,  Thanks a lot for your prompt reply....

Its working fine with actual data....

The only Problem is, iam getting the cumulative value for all the months, eventhough i didn't have the data for some months.

I mean i have data from Jan to Jul.... Your expression is excellently working for  these months.....

But from Aug to Dec (No data for these months) but it is showing Jul data(Cumulative) constantly for all these months. How can i fix this? Do you have any idea?

Please check the attachment for the graph....

Regards

Siva

vgutkovsky
Honored Contributor II

Re: Cumulative expression?

Just insert an IF statement at the beginning of the Cumulative Variance expressions:

if(rangesum(column(1))<>0,

or maybe

if(sum(A)<>0,

Community Browser