Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Running Total Calculation

I am trying to add a calculation of a running total column to get a weekly $and a YTD %.

When i turn on Full acumutlion for the last column I am getting

                    0.99

                    1.975

                    2.073

etc instead of

                    0.99

                    0.985

                    0.98

its adding up the entries from the prior line                  

WEEKSUM(hours1) as ASUM(hours2) as Bsum(A) / SUM(B)SUM(RUNNING TOTAL A) / SUM(RUNNING TOTAL B)
--------------------------------------------------------------------------
1991000.990.99
2981000.980.985
3971000.970.98
4961000.960.975
5951000.950.97
610010010.975
7961000.960.973
8951000.950.97
9991000.990.972
10991000.990.974
ETC...

-Brian

1 Solution

Accepted Solutions
jason_michaelid
Honored Contributor II

Re: Running Total Calculation

Hi Brian,

Your expression should be:

RangeSum(Above(Sum(Hours1),0,RowNo()))/RangeSum(Above(Sum(Hours2),0,RowNo()))

See attached.

Hope this helps,

Jason

2 Replies
jason_michaelid
Honored Contributor II

Re: Running Total Calculation

Hi Brian,

Your expression should be:

RangeSum(Above(Sum(Hours1),0,RowNo()))/RangeSum(Above(Sum(Hours2),0,RowNo()))

See attached.

Hope this helps,

Jason

Not applicable

Re: Running Total Calculation

Jason,

     That worked perfect

Thanks

-Brian

Community Browser