Filter Your Dashboards with MongoDB Charts

Tom Hollander

#Charts

MongoDB Charts on Atlas now supports dashboard-level filters, allowing you to quickly change the context of a single dashboard to better focus your analysis.

What is dashboard filtering?

MongoDB Charts is MongoDB’s native data visualization tool, built right into Atlas. It allows you to quickly gain insights into your data by building charts and tables and arranging them on dashboards.

When you have a lot of data, it is common to filter the data shown in a single chart, so that it shows only the data you’re interested in and not the entire collection. Charts has long allowed you to do this by either dragging and dropping the fields you want to filter, or by entering your own MQL query. Either way, the filter is baked into that particular chart.

Sometimes that is exactly what you want, but it can be problematic in some cases, for example:

  • You may have many charts on your dashboard, and you want to ensure they all filter data in the exact same way.
  • Different people viewing the dashboard may be interested in different subsets of the data, and you don’t want to create multiple copies of the same dashboard.

To cater for these kinds of scenarios, we’ve added dashboard filters to Charts. As a dashboard author, you can now build a single copy of your dashboard, and decide which fields should be exposed as filters. Viewers of your dashboard (including yourself!) can then filter the data as they wish without impacting other users.

An example

Let’s use an example to show why this feature is useful and how to use it.

Suppose you work for a company that manages a portfolio of rental properties around the globe. The information about each property is stored in MongoDB, so Charts is a great choice for visualizing and analyzing the data. In no time, you can create a dashboard like this to show some key stats about your rental properties.

MongoDB Charts

This is a good looking dashboard, but since it shows so many properties across so many locations, it may not be useful for detailed analysis focused on a particular region or set of properties. This is where dashboard filtering comes in. As the dashboard author, you can click the Dashboard Filters icon at the top right, and then choose Edit. Now you can drag whatever fields you want to expose as dashboard filters onto the filter pane (in this case, address.market and bedrooms), set the default values, and apply the filters.

Edit Dashboard Filters

Now, any user of the dashboard can modify their personal view of the dashboard to see just the data that they are interested in. 4 bedroom properties in Hawaii? Sure thing:

Four Bedroom Properties in Hawaii

Or maybe you prefer 2 bedroom properties in Sydney:

Two Bedroom Properties in Sydney

The possibilities are endless, and it’s all built on a single dashboard! Each user’s filter choices are saved just for them, and can be easily changed by choosing new options in the dashboard filter pane.

What’s coming next?

Dashboard Filtering in Charts is ready to use today, and can be accessed by clicking the Dashboard Filters icon on any dashboard when signed into Charts. In this initial release, dashboard filters are not available on public link-shared dashboards, but we’ll be adding support for this soon. Also coming soon is the ability to link a single filtering card to more than one data source.

Try it out

We’d love to find out how this feature works for you. If you have any questions, feel free to use the in-product chat, or if you have suggestions on how to improve anything in Charts, use the MongoDB Feedback Engine.

If you haven’t tried Charts yet, you can get started by signing up for MongoDB Atlas for free.