Hi Team,
Looking for some help to calculate the length of a streak based on a specific set of conditions.
Data is as follows:

I need to calculate the length of the 'Indicator' streaks, partitioned by the Town, Shop, Item and Monday_Date. However, the streak counter should reset if Monday_Dates aren't consecutive, i.e. 7 days between them. Here's what would be returned:
Finally, I'm looking for a summary something like this:

Hope this is clear. I've had a play with row_count and lag functions, but I'm struggling to knit everything together.
Thanks in advance.
Matty
