I have an aggregate query in Charts that uses a $facet to group values. The $match in the facet stage uses dates as it’s filter. Is there any way to insert these dates from a embedded chart implemention?
I know I can set the &filter variable in the payload request, however I believe this only filters at the top level?
My issue is that records contain two dates (one started and one finished). In my match statement (could be replaced by the filter value) I look at the startdate being between two dates or the finishdate between two dates. In the facet I do a match on the startdate being between the two dates (so count as started) and the finishdate being between two dates (so count as finished). How would I solve that in a single query in Charts (for use with embedding)?