How to count from first unique value till the next unique value is encountered?

Hi

See Repeating a Moving Aggregation (What are the options): Is similair problem / solution

gr. Hans