Use Observable.Scan
:
var observable = Observable.Range(0, 10);
observable
.Subscribe(x => Console.WriteLine("Received value: " + x));
observable
.Scan(0, (sum, x) => sum + x)
.Subscribe(sum => Console.Writeline("Sum so far: " + sum));
Observable.Sum
is going to only ever emit a single token, which is the sum of the entire finished sequence. Observable.Scan
is going to emit a token every time it receives a token from the source.