$unionWith in atlas charts giving error: is not a valid aggregation stage or is not supported by Charts

hello everyone, i am trying to use $unionWith in an atlas chart query, i receive the following error:

$unionWith is not a valid aggregation stage or is not supported by Charts.

even though in the release notes [https://www.mongodb.com/docs/charts/release-notes/#charts-v1.33.1], $unionWith is supported in charts.

Any thoughts.
Thank you
Jad

Hi @Jad_Bsaibes; to use $unionWith you need to put the query in a “Charts View” on the data source; you can’t do it directly in the query bar.

Tom

1 Like

thank you so much Tom, it worked perfectly with Charts View.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.