Forum Discussion
Formula to see how often and how long something happens?
- Mar 20, 2021
Please check in attached. You need to drag cells from three columns at once.
Dear Sergei.
Thank you very much for this. It is extremely helpful! These formulas look like some black magic!
I was wondering if you could help with the next step of this.
Suppose, I would like to know, how often a banking crisis happened in a country (I have the data, we are concerned about the beginning of the banking crisis not how many years it lasted so we assume just one year) in relation to the occurrence of such episodes when GDP growth was more than 3% per year.
Specifically, I would like to know if:
1. A banking crisis happened during the first year of such an episode of 3% growth.
2. A banking crisis happened during the last year of such an episode of 3% growth.
3. A banking crisis happened during an episode of 3% growth (not the first year not the last year).
4. A banking crisis happened the very next year after the episode of a 3% growth.
I populated this with examples of banking crises for Australia (fictional data).
if GDP in year x < .03 AND GDP in year (x +1) >= .03
that will indicate your first year of 3% growth, to find the other scenarios just modify your conditions as needed. Put the results as a Boolean (1 for true) as new columnar data in the time series and the "how often" question is the sum of each column.