I have a table with 2 columns: ID and Numbers; and I want to create a new column Result with the running total of the Numbers column but every time the running total surpass 20, the running total should be restarted. Also, if the running total is lower than 20, the result should not be displayed. This have to be done using DAX only.
Thanks in advice.
Note: the Conditional Running Total column exist just to show how the running total works.
| ID | Numbers | ConditionalRunningTotal | Result |
|---|---|---|---|
| 1 | 9 | 9 | |
| 2 | 7 | 16 | |
| 3 | 9 | 25 | 25 |
| 4 | 8 | 8 | |
| 5 | 9 | 17 | |
| 6 | 9 | 26 | 26 |
| 7 | 1 | 1 | |
| 8 | 0 | 1 | |
| 9 | 0 | 1 | |
| 10 | 9 | 10 | |
| 11 | 9 | 19 | |
| 12 | 2 | 21 | 21 |
| 13 | 1 | 1 |
Eddit: I added couple more rows to test the solution.
