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: 
nevilledhamsiri
Specialist
Specialist

Running Total/Average

Hi,

How I may get the above results in a given series of data array which might look something like below!

Thanks

Neville

  

Item201220132014201520162017
revenue         250,000          352,000          325,000          325,000          450,000          500,000
Expenses         100,000            75,000            85,000            50,000            75,000            85,000
Running Total         250,000          602,000          927,000      1,252,000      1,702,000      2,202,000
Running Average         250,000          301,000          309,000          313,000          340,400          367,000
1 Solution

Accepted Solutions
nevilledhamsiri
Specialist
Specialist
Author

HI!

Great!  Results were  produced instantly. Dear Sunny & the rest of the guys, please accept my good wishes!

View solution in original post

7 Replies
sergio0592
Specialist III
Specialist III

Hi, in your pivot chart, try with the following expression :

after(rangesum(Before(Sum(Revenue),1,ColumnNo())))

sergio0592
Specialist III
Specialist III

For running total, a better way with :

rangesum(First(Sum(Revenue),1,ColumnNo()))

nevilledhamsiri
Specialist
Specialist
Author

Hi!

Dear,

See where I have gone wrong!. It looks like results are not produced!

RangeSum(First(Sum(REVENUE),1,ColumnNo()))

After(RangeSum(Before(Sum(REVENUE),1,ColumnNo())))

sunny_talwar

If Year is going down instead of going across, try this

Running Total

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

Running Average

RangeAvg(Above(Sum(REVENUE), 0, RowNo()))

vvira1316
Specialist II
Specialist II

Hi,

Please find calculations for Running Total and Average

Total

=RangeSum(Above(TOTAL RangeSum(Revenue), 0, RowNo(TOTAL)))

Average

=RangeAvg(Above(TOTAL RangeSum(Revenue), 0, RowNo(TOTAL)))

As Sunny mentioned about data and above was using his other response

Running Total in a graph

sergio0592
Specialist III
Specialist III

In your sample for me it was a pivot chart with Item as dimension and Year as column. If it's a straight table with only year as dimension, as said by Sunny, use above() or top() with

rangesum(Top(Sum(Revenue),1,RowNo()))

nevilledhamsiri
Specialist
Specialist
Author

HI!

Great!  Results were  produced instantly. Dear Sunny & the rest of the guys, please accept my good wishes!