All Collections
Datatrics Analytical
Inspiration and examples
Inspiration and examples

In this article, you will find some examples of visualizations to use as inspiration

Xander Wijering avatar
Written by Xander Wijering
Updated over a week ago

Some of these examples are found in Metabase's own help documentation. We recommend reading this documentation to find inspiration or solutions to your problems relating to creating visualizations.

Combo charts

A Combo chart is a type of chart that combines a bar chart with a line chart, allowing you to show two different types of data in the same visualization.

In a Combo chart, the different chart types are overlaid or combined in a way that allows you to compare and analyze the data more effectively. This type of chart is particularly useful when you have data that have different units of measurement or data that have different scales.

For instance, if you want to visualize the monthly sales revenue and the total number of units sold for each product, you can use a Combo chart that combines a line chart to represent the revenue and a bar chart to represent the units sold. This will give you a more comprehensive view of your data and help you to identify any patterns or trends more easily.

Question & Visualization

In this example, we created a combo chart of orders and AOV per month. The question is built from the Events table, filtering just purchases and summarizing it by the count of rows and the average revenue of orders per month.

Pie charts

Pie charts are ideal for displaying metrics by a single dimension, particularly when the number of possible breakouts is limited, such as users by gender. However, if there are several breakouts, like users per country, a bar chart is generally more effective as it allows for an easier comparison of each bar's relative size. When using pie charts, you can select the measurement and dimension fields and customize slice colors and the legend.

Question & Visualization

In this example, we created a pie chart of new and returning visits over the last three months. We used data from the Events table and filtered just the last 3 months. We wanted to calculate the unique users by the visitor returning column, which can only be filled with the values: ‘new’ or ‘returning’.

Scatterplots & Bubble charts

Scatterplots are a useful way to visualize the correlation between two variables, such as the age of your users compared to how much they've spent on your products. You can create a scatterplot by asking a question that results in two numeric columns or by selecting two numeric fields from a raw data table.

If you have a third numeric field, you can create a bubble chart by selecting the Scatter visualization and choosing a field for the bubble size. This field determines the size of each bubble on the chart, such as the average order value.

Question & Visualization

In this example, we created a bubble chart containing the average order value and orders per hour over the day of the last three months. Therefore, we must filter the Event table by purchases over the last three months with the column datetime. Just like the combo chart, we need 2 values. These are the average revenue and the count of rows having a purchase as conversion type. This data needs to be summarized by the hour of the day.

The higher the bubble is positioned, the more orders are registered that hour. The bigger the bubble, the higher the AOV. You can change the color to your liking.

Gauge

The Gauge visualization in Metabase enables the display of a singular numerical value within a range of colored bands, which can be customized to your preferences. Upon selecting the Gauge visualization, red, yellow, and green ranges are automatically generated by default. However, you can modify these ranges by accessing the visualization settings, where you can specify your desired color schemes and even label specific ranges according to your needs.

Question & Visualization

For this visualization, we chose to create a stock visualization, meaning we wanted to display the percentage target of items in stock. This question is created by filtering the attribute: Availability (which is customer-specific) to select items that are both in stock and out of stock. The tricky part of creating the question is the custom expressions that have been used to prevent two columns with absolute values. To create a dynamic range, you need to produce 2 relative numbers.

We created 2 custom expressions to get the share number of both columns we filtered.

Share(contains([attribute], "attribute_name_1"))
Share(contains([attribute], "attribute_name_2"))

In our example, we used this snippet:

Share(contains([Availability], "in stock"))

Year-to-year comparison analysis

A commonly used visual is the comparison of one year to another. Metabase offers great documentation on this specific use case. To make this possible, you will need to create a custom column with the date of the two years. In our case, we needed to insert this code to compare 2019 vs. 2020.

case(between([Datetime], "2019-01-01", "2019-12-31"), "2019", between([Datetime], "2020-01-01", "2020-12-31"), "2020")

This column will be used to summarize.

Retrieve all items from a specific category / JSON object

When data is stored in a JSON object, you cannot just query on it as Metabase and SQL see this as an attribute of itself. For example, a category found in Datatrics content:

[{"name": "Bicycles", "categoryid": "1"}]

Metabase will not recognize this as a category, so therefore we need to use a workaround with SQL, which is called a JSON_SEARCH. This needs to be added to your SQL query.

This functionality enables users to search in the JSON attributes and retrieves the data they want to extract:

where JSON_SEARCH ( `content`.`categories`, 'all', '1', NULL, '$[*].categoryid' ) IS NOT NULL;

Note that we search on the categoryid ‘1’ in the example above.

Note: Do you want to get even more potential out of Analytical? View these tips to learn even more!

Did this answer your question?