I'm looking for some code that will generate the 'NewColumn' as below I basically want to find the streak of the current 'Result' value. For example if there have been 3 'Incorrect' results in a row then the new column should display the integer 3.
Thanks for any help
Day Result NewColumn
1 Correct 1
2 Correct 2
3 Incorrect 1
4 Incorrect 2
5 Incorrect 3
6 Incorrect 4
7 Correct 1
8 Correct 2