Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vkal12
Creator
Creator

Rolling sum starting from a specific timestamp

Hello Community,

I have an hourly report where I want to calculate the total value starting from a specific hour. My data looks like this: 

vkal12_0-1682670202538.png

 

For each day I want to have a KPI that sums up the total value starting from 6 o'clock. I checked for RangeSum() but I cannot get the right values in my table. 

I hope someone can support me. 

Thank you very much in advance!

Labels (3)
1 Solution

Accepted Solutions
Kushal_Chawda

@vkal12  try below

rangesum(above(Sum({<Hours={">=6"}>} Value),0,RowNo())) + Sum({<Hours={"<6"}>}Value)

View solution in original post

4 Replies
Chanty4u
MVP
MVP

May be try this 

 

Sum({$<Hour={">=6"}>} Value)

 

vkal12
Creator
Creator
Author

Hi Chaty4u,

of course this formula works but I need to have the same table as mentioned in my question. This means that in each additional row I need to have this kind of rolling sum. 

Do you have another idea? 

Kushal_Chawda

@vkal12  try below

rangesum(above(Sum({<Hours={">=6"}>} Value),0,RowNo())) + Sum({<Hours={"<6"}>}Value)
vkal12
Creator
Creator
Author

Thank you for this formular - it works perfectly!