Hey,
I need help to achieve desired result out of the below shown data:
Requirement
1. Fill "Rolling Total" column : whenever value<threshold, Rolling total = [Value]+[Row+1:Value]+[Row+2:Value]+[Row+3:Value] (if threshold = 3) i.e addition till threshold value.
2. Also need to make sure it shouldn't add value from other "Name". meaning, no value from "Dog" to be added in "Cat".
3. In case there are no enough data to reach threshold limit, it should add all the next available values. For example. If my threshold = 4 but I have only 3 further value points, it should add all three next values.
I am using the Multi-Row formula with below code but it is adding values from "Dog"
If [Name] = [Row+1:Name] then
If [threshold] = 3 then
[Value]+[Row+1:Value]+[Row+2:Value]+[Row+3:Value]
else if [threshold] = 4 then
[Value]+[Row+1:Value]+[Row+2:Value]+[Row+3:Value] + [Row+4:Value]
else
0
endif
else 0
endif
I am aware that the start of the code is incorrect but I am not sure how do I change it to get desired result.