For Chapter 3, Lab - $group and Accumulators, how do I get $avg to not be null

I’ve filtered my list down to where imdb.rating exists (which is probably wrong, films without a rating would still count in terms of count, but I’m trying to debug)

When I read the documentation, it says that non-numeric values are ignored: https://docs.mongodb.com/manual/reference/operator/aggregation/avg/

I’m still getting null. I’m baffled at what I could be doing wrong

I was putting ‘imdb.rating’ in the expression instead of ‘$imdb.rating’

@Erica_Stevenson_73099

Well, that’ll do it Glad you figured it out. :wink: