Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Creator III
Creator III

Cumulative calculation from 3rd day

Hi,

We were using the below logic to get the cumulative total.

Logic: rangesum(above(total sum(Product$TY), 0, rowno(Total)))

But we need to calculate the cumulative total from 3rd row.

Thanks..

1 Solution

Accepted Solutions

Hi

Instead of RangeSum, try with RangeAvg() function.

Hope it helps

Thanks & Regards,
Mayil Vahanan R

View solution in original post

8 Replies
Master III
Master III

So this expression is used in straight table. You can use rank() there and just write a if condition that if rank is 3 then rangesum(above(total sum(Product$TY), 0, rowno(Total)))

Creator III
Creator III

Hi,

Can you please provide the complete logic,because when i include the rank in the logic it gives error.

Thanks..

Hi

Are you looking like this

rangesum(above(total sum(Amount), 0, rowno(Total)-2))

Thanks & Regards,
Mayil Vahanan R

Hi,

Try this,

Rangesum(Above(total If(Rowno(Total)>2, sum(Product$TY)), 0, Rowno(Total)))

Creator III
Creator III

Hi,

We need to accumulate the data as below..

31st would remain same..1st would remain same and from 2nd it should accumulate with 1st and so on..

Untitled.png

Thanks..

Hi

Try like this

RangeMax(If(Rowno(Total)> 2, rangesum(above(total sum(Amount), 0, rowno(Total)-1)), 0), Sum(Amount))

Thanks & Regards,
Mayil Vahanan R
Creator III
Creator III

Thanks Mayil..

The same if we need to do it for %..and we use the below logic..but it simply adds the sum like 1st the % is 10.5% on 2nd its 90.5% but here the cumulative gives 101% which is not correct..we need the avg %

Below is the logic used:

RangeMax(If(Rowno(Total)> 2, rangesum(above(total ((Sum(Product$TY))/Sum(Product$LY)), 0, rowno(Total)-1)), 0), ((Sum(Product$TY))/Sum(Product$LY)))

Thanks...

Hi

Instead of RangeSum, try with RangeAvg() function.

Hope it helps

Thanks & Regards,
Mayil Vahanan R

View solution in original post