Hi guys,
I have the following problem for a time series:
Column A = Date
Column B = values
Column C = if B < 20, then 1, otherwise 0
What I want for column D: Start counting from 1 up, when C = 1 until it switches back to 0 (so it should give me the cumulative number of days, time series is below 20 for x consecutive days)
Col A | Col B | Col C | Col D
19.1.2016 | 21,1 | 0 | 0
20.1.2016 | 19,9 | 1 | 1
21.1.2016 | 18,4 | 1 | 2
22.1.2016 | 17,3 | 1 | 3
23.1.2016 | 20,1 | 0 | 0
Thx in advance!
Bookmarks