Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Differences Rangesum Above

Hi guys,

I have a query, I have 2 qvw files that have the same formula (cumulative sums) and but in one it comes out correctly, and in the other it comes out differently I have searched the root of the problem even ordering my table for the accumulated sum But still goes wrong. I hope you can help me.

Thank you so much.

Correct graphic:

correct.PNG

Incorrect graphic:

Incorrect.PNG


1 Solution

Accepted Solutions
sunny_talwar

I think the problem here is the sort order of Fecha EM... If you have QV12, you can use this

=fabs(sum({<[MSEG.Clase de movimiento_BWART]={'201','221','261'}>} num(MSEG.Cantidad_MENGE)))

/

avg(

aggr(

rangesum( above( sum({$<[Año EM],[Mes EM]>} num(MSEG.Cantidad_MENGE)),0,RowNo())),

[Material EM],([Fecha EM], (NUMERIC))

)

)

or you will have to fix the load order in the script to make this work

View solution in original post

2 Replies
sunny_talwar

I think the problem here is the sort order of Fecha EM... If you have QV12, you can use this

=fabs(sum({<[MSEG.Clase de movimiento_BWART]={'201','221','261'}>} num(MSEG.Cantidad_MENGE)))

/

avg(

aggr(

rangesum( above( sum({$<[Año EM],[Mes EM]>} num(MSEG.Cantidad_MENGE)),0,RowNo())),

[Material EM],([Fecha EM], (NUMERIC))

)

)

or you will have to fix the load order in the script to make this work

Anonymous
Not applicable
Author

Thank you so much!!