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: 
d3fault
Contributor II
Contributor II

Kind of a rolling sum in a month w/o month as dimension

Hi everyone, 

I'm struggling for few hours with this challenge and don't know what to try more...will wait for tomorrow morning to refresh my mind. 

I need to calculate the bottom three rows, but If I can figure it out how to calculate the 1st one, the rest will result from it. 

Basically, I need in this table to roll over day by day, each day has a flag 1, or not - 0, and I need to show on 1st row sum of the total month ( i don't have Month as a dimension so total aggregation won't work), and the next two rows will be sum until the current date and sum after the current date, both in the context of the Dates month. ( the current values are simple rages so not correct) . Please help with some advice as I'm stuck...maybe the solution is too simple 😕

pivot.PNG

1 Solution

Accepted Solutions
chris_djih
Creator III
Creator III

I think you should try Rangesum(Above()).
If you need some more advice may first see: https://community.qlik.com/t5/QlikView-App-Dev/Rangesum-Above-Below-and-Before-After-and-Range-Avg/t... .

if you don't get anywhere with it, just tell your progress here and ask further.

If you found help, mark the correct answer and give some likes to ALL contributors, that tried to help.

View solution in original post

3 Replies
chris_djih
Creator III
Creator III

I think you should try Rangesum(Above()).
If you need some more advice may first see: https://community.qlik.com/t5/QlikView-App-Dev/Rangesum-Above-Below-and-Before-After-and-Range-Avg/t... .

if you don't get anywhere with it, just tell your progress here and ask further.

If you found help, mark the correct answer and give some likes to ALL contributors, that tried to help.
d3fault
Contributor II
Contributor II
Author

Thank you @chris_djih ,  as expected it was actually simple...as you said with RangeSum and playing with the number of the day in the month that would make the range dynamic 

This would give the sum of flags on the days left until eom: 

rangesum(after((Sum(Flag)),0,day(monthend(Date))-Day(Date)))

chris_djih
Creator III
Creator III

Sounds as if you found your solution. If so please mark as solved.

If you found help, mark the correct answer and give some likes to ALL contributors, that tried to help.