Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Cumulative Calculation Error

Hi All,

I am using following formula to get cumulative over the period. I have MonthlySaving field and I want to get running sum each month or filter by any period (Quarter/Year from my calendar date).

RangeSum(Above(TOTAL Sum([VRMonthlySaving]), 0, RowNo(TOTAL))).

I tried it on my data it gave me 0's and the values started from mar-2017 but wrong. I am using derived Year/Month from date. It gives me calculation for MonthlySaving properly by month as shown in graph and table. But I am unable to get cumulative. Where I am wrong.untitled.png

10 Replies
kulwantsaj219
Contributor II

Re: Cumulative Calculation Error

try this:

RangeSum(Above(Sum(VRMonthlySaving),0,RowNo()))

ahaahaaha
Honored Contributor

Re: Cumulative Calculation Error

Hi,

Try

RANGESUM(ABOVE(TOTAL Sum(VRMonthlySaving),0, ROWNO(TOTAL)))

Not applicable

Re: Cumulative Calculation Error

Try this

aggr(RangeSum(Above(Sum(VRMonthlySaving),0,RowNo())),VRDate.Year)

Not applicable

Re: Cumulative Calculation Error

Hi Andry,

I tried but it gave me results ( not desired one) like in below picture

Re: Cumulative Calculation Error

Is VRMonthlySavings an expression? Does it include a set analysis to ignore selections in certain fields? May be you need to ignore the same fields in this expression

RangeSum(Above(TOTAL Sum({<Field1, Field2, Field3>}[VRMonthlySaving]), 0, RowNo(TOTAL)))

Not applicable

Re: Cumulative Calculation Error

VRMonthlySaving is a calculated field in load script. and its working well as shown in chart for any period. I just want to have running sum for this. Thanks

Re: Cumulative Calculation Error

You only have a single dimension in your chart? Any selections?

Not applicable

Re: Cumulative Calculation Error

I have date dimension for this particular chart. I am trying with date (yearMonth) dimension. I have fiilter pan for all derived calendar date, i.e date parts like year/monty/quarter.

Re: Cumulative Calculation Error

Expression look right to me.... may be a sample might help find the issue

Community Browser