CumulativeSum replacing value of certain rows

Seems the same question is asked here: Cumulative sum of calculated measure for tasks grouped by Epic - #6 by jakedatreble

Sorry for the duplicate.