Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
this
Contributor II
Contributor II

Running Sum across columns

this_0-1687961923272.png

Hi Qlikkers, I am new to Qlik and try to do something I did in Tableau.
In Tableau this would be a Running Sum(sum(points)) and then tell what direction or dimension to address and partition by. 

I have figured out to use something like this: RangeSum(Above(sum(points),0,ColumnNo())) 
However, this does not work at all. I get an empty sheet.

Is there a good resource to learn all about running calculations?

Kind regards,
Matthias

Best Regards,
Matthias
Labels (1)
1 Solution

Accepted Solutions
this
Contributor II
Contributor II
Author

Hi Marcus

Yes, sorry for the late reply. I could export it as a qvf and send it to a colleague. 

The answer to make it work was to use aggr:

Best Regards,
Matthias

View solution in original post

6 Replies
marcus_sommer

Try it with: RangeSum(Above(sum(points),0,RowNo())) 

this
Contributor II
Contributor II
Author

Many thanks for the fast reply. I thought the Tableau Community forum has a fast response time. Well, I thought 😉

I have tried that as well. 

This is what I get then: 

this_0-1687963308757.png


Maybe there is something breaking it or I would have to dedicate it to the surname.

Best Regards,
Matthias
marcus_sommer

It looked that there isn't a single dimension within the chart else two ones. Therefore try it with:

RangeSum(Above(sum(points),0,RowNo(total))) 

this
Contributor II
Contributor II
Author

Hi Marcus

Thank you. 
This gives me the exact same result, unfortunately. 

Could it be due to the data model? Surname is from the drivers table,  round is from the races table, and points are from the result table. The common fields are DriverID and RaceID. I am not sure if I did the correct associative relation. 

this_0-1687965448271.png

 



Matthias

Best Regards,
Matthias
marcus_sommer

I think I would duplicate the chart and changing the type to a table-chart and playing there with the rangesum() and the normal sum(points) and rowno() with and without the total as extra expressions to look if they return the expected results. If you find a working way you could adapt this approach to the line-chart.

this
Contributor II
Contributor II
Author

Hi Marcus

Yes, sorry for the late reply. I could export it as a qvf and send it to a colleague. 

The answer to make it work was to use aggr:

Best Regards,
Matthias