Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
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_Michaelides
Luminary Alumni
Luminary Alumni

Hi Brian,

Your expression should be:

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

See attached.

Hope this helps,

Jason

View solution in original post

2 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

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
Author

Jason,

     That worked perfect

Thanks

-Brian