MongoDB Charts - Aggregation Pipeline to get most recent value and CummulativeSum of a field

Hi Tom,
Thank you for your reply. When I type the following query in the query bar,

[{$setWindowFields:{
	sortBy:{
		time:1
	}
	,output:{
		balance:{
			$sum:"$profit_real",window:{
				documents:["unbounded","current"]
			}
		}
	}
}
}]

The query compiles without any error, but the Balance is showing up as a column filled with zeros:

I also need to filter the rows based on the entry column value by using {entry:1} in the query bar. So the $setWindowFields cummulative sum aggregation query needs to be combined with this {entry:1}
Can you kindly guide me by providing the right query for doing this cummulative sum?

Best Regards,
Dilip