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日 | ||
value | 300 | 400 | 0 | 0 | 700 | 0 | 900 | |
Workday | ☑ | ☑ | ☑ | ☑ | ||||
movingsum value | 2 | 2 | 2 | 2 | 2 | 2 | 2 | |
Value(movingsum) | 1400 | 2000 |
※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
-
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).
0 -
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.
0 -
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.
0 -
I want to achive movingsum only workday.
I don't think your logic can achieve this.
1月3日 1月4日 1月7日 1月9日 value 300 400 700 900 Workday ☑ ☑ ☑ ☑ movingsum value 2 2 2 2 Value(movingsum) 1400 2000 ・・・ ・・・ 0