Movingsum with boolean item

I want to use movingsum function.

But I have a restrict of calender.

 

 1月3日1月4日1月5日1月6日1月7日1月8日1月9日 
value300400007000900 
Workday    
movingsum value2222222 
Value(movingsum)14002000      

 

※Value(movingsum) = Movingsum( value, 0 ,movingsum value)

 

If I used this formula, I can not consider workday.

I want to achieve this sum function.

 - On 1/3,  I have to sum from 1/3 to 1/7. 

 - On 1.4, I have to sum from 1/4 to 1/9.

 

Do you have any idea?

 

Answers

  • @hyudolee 

    please explain

    Workday boolean is a calculated one or it is an input field? And then based on it movingsum value is calculated? Not clear what should be in 1/7 value(movingsum).

  • Hello, @KirillKuznetsov .

     

    I will answer your question.

     

    Workday boolean lineitem is calculated by calender.

    And then movingsum value(=2) is set by enduser.

     

    Why is your question is important?

    I think the point is we can use movingsum function with boolean item or we can calculate it by another funciton.

     

     

  • @hyudolee 

    From your example it was unclear what is input and what is calculated. But thanks for more information!

    You can trigger movingsum using the boolean if you apply IF statement. For example, you can create additional line item "movingsum value calc" and set dependency on the boolean. Like so: IF Workday THEN 0 ELSE movingsum value

    The logic can be whatever complexity you wish.

    After that you can replace an argument for MOVINGSUM function by this new one.

     

  • I want to achive movingsum only workday.

    I don't think your logic can achieve this.

     

     

    1月3日1月4日1月7日1月9日 
    value300400700900 
    Workday 
    movingsum value2222 
    Value(movingsum)14002000 ・・・・・・