Thanks for the suggestion on calculating the date using JS. Unfortunately I need to create a view from the aggregation query, which does not support JS as far as I know.

The view is used for Atlas SQL which is loaded into PowerBI. Since the collection 1TB+ loading and filtering in PowerBI is not an option.

Like I said, the view is in use for ~2 years, and in the past the $expr stage did use the index just fine. I’m wonding if MongoDB changed something without us noticing, or if it is a bug.