Skip to main content

Hello community,

I'm looking for a cumulate grouped by Qty. I have a first metric which indicates my need of Qtés per week, and I need a second metric able to detect the week when I exceed the minimum to order. 
In my example, I have a minimum order of 6. 

In Line 1 I calculate my requirement per week. (that's done)
In Line 2 I want to trigger an order when I've reached at least my minimum order.

If I have that, it's already good 

In an ideal world, I'd have to reduce this quantity to the 1st week, a bit like a moving sum function but with variable parameters. 

If anyone has an algo idea, I'd be grateful ^^.

 

I finally passed part 1
Line 2 = 
if( previous( Week) >= 6 , 'Line 1', if( previous( Week) < 6 ,'Line 1' + PREVIOUS(Week),'Line 1'))



of course my 6 is variable in my prod


Reply