07-10-2024 11:36 PM - edited 07-10-2024 11:40 PM
Hi,
I'm trying to achieve a rolling sum with a max condition. Basically trying to do a rolling sum but before we roll the 1st row sum to the next row we have to check with a condition if the rolling value is less than or equal to Zero. If it is less than zero we have to make it as zero else we will roll the sum with the +ve value. Please see attached sample. Column in Green is something which we have to achieve.
Note: Please see comment in cell P11. Please provide a solution on the MV side as the calculation will be further used in other tables.
Appreciate your help
Thanks,
Nikhil
Solved! Go to Solution.
07-17-2024 12:03 AM
@JoeM : My bad, Its working. I made some mistake while reading the columns.
FYI - one of our teammates found a solution using SQL - You can refer attached sql code.