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

cumulative sum

Hi,

i want to do a cumulative sum by month but i don't know how to do this,

i try the rangesum function but it dont work...

Sans titre.jpg

The CA field is this expression : Sum({$<[LVR.Date d_expédition]={">=$(vStartDate)<=$(vEndDate)"}>}LVR.Montant)/1000

How can i do this? Thanks a lot !!

1 Solution

Accepted Solutions
Kushal_Chawda

try ,

=RangeSum(above( Sum({$<[LVR.Date d_expédition]={">=$(vStartDate)<=$(vEndDate)"}>}LVR.Montant)/1000,1, RowNo()),

Sum({$<[LVR.Date d_expédition]={">=$(vStartDate)<=$(vEndDate)"}>}LVR.Montant)/1000,

)

View solution in original post

10 Replies
er_mohit
Master II
Master II

Hi try this

Rangesum(Above(Sum({$<[LVR.Date d_expédition]={">=$(vStartDate)<=$(vEndDate)"}>}LVR.Montant),1,rowno(Total)))/1000

or try this

Rangesum(Above(Sum(LVR.Montant),1,rowno(Total)))/1000


Not applicable
Author

Hi ! Thanks for your speed answer but the twice function that you give me made "0" everywhere...

Not applicable
Author

Hi I am attaching QVW ..this might help u..

sample data..sample screen shot..

Capture1.PNG

Not applicable
Author

Thanks a lot Narendra .. but

So i try this :

Rangesum(Above(Sum({$<[LVR.Date d_expédition]={">=$(vStartDate)<=$(vEndDate)"}>}LVR.Montant),0,rowno()))/1000

Capture.JPG

as you can see that don't give me cumulative

I try Rangesum(Above(Sum(LVR.Montant),0,rowno()))/1000 but it doesen't work too

Kushal_Chawda

try ,

=RangeSum(above( Sum({$<[LVR.Date d_expédition]={">=$(vStartDate)<=$(vEndDate)"}>}LVR.Montant)/1000,1, RowNo()),

Sum({$<[LVR.Date d_expédition]={">=$(vStartDate)<=$(vEndDate)"}>}LVR.Montant)/1000,

)

Not applicable
Author

Hi, the same result like before

thanks a lot

Kushal_Chawda

Please post your sample app

Kushal_Chawda

have you tried the expression which I suggested? what values you are getting using that?

Not applicable
Author

Oh that works sorry i tried your expression and that seem to be ok

thanks a lot KUSH !! So much!!