# 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
Did you mean:
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
MVP

Hi

Instead of RangeSum, try with RangeAvg() function.

Hope it helps

Thanks & Regards,
Mayil Vahanan R
8 Replies
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

Hi,

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

Thanks..

MVP

Hi

Are you looking like this

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

Thanks & Regards,
Mayil Vahanan R
MVP

Hi,

Try this,

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

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..

Thanks..

MVP

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

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...

MVP

Hi

Instead of RangeSum, try with RangeAvg() function.

Hope it helps

Thanks & Regards,
Mayil Vahanan R
Tags