Metabase
Last updated
Was this helpful?
Last updated
Was this helpful?
The way you log in to Metabase will depend on how you or your admin set it up, so if you don’t know where to go, just ask the person who sent you your Metabase invite.
Go to site:
Enter your email and password, then click sign in.
Fresh out of the box, Metabase will show you a few things on the home page:
Some automatic explorations of your tables that you can look at and save as a dashboard if you like any of them.
An area where things you or your teammates create will show up, along with a link to see all the dashboards, questions, and pulses you have.
A list of the databases you’ve connected to Metabase.
But, enough about that — let’s get to asking questions. For the next few examples, we’ll be using the Sample Dataset that comes with Metabase.
Go ahead and click Ask a question at the top of the screen. There are several ways you can ask a question in Metabase, but we’ll click on the Simple Question option for now. You’ll then need to pick the table that you have a question about.
Click the database that the table is in, then pick the table from the list.
Once you do, you’ll see the table’s contents.
The Orders table has a bunch of fake data in it about product orders for a made-up company. Let’s start with a simple question about these orders: how many orders have been placed with a subtotal (before tax) greater than $40? More precisely, this question translates to: “How many records (or rows) are in the table ‘Orders’ with a value greater than 40 in the Subtotal column?”
To find out, we want to filter the data by the field we’re interested in, which is Subtotal. Since each row in this table represents one order, counting how many rows there are after we’ve filtered them will give us the answer we want.
So, we click the Filter button to open up the filtering sidebar, then select Subtotal as the column to filter on, and we’ll get some options for the filter. We’ll choose Greater than, type the number 40 in the box, and click Add Filter.
Next we need to tell Metabase what number we want to see. When we ask things like “how many,” “what’s the total,” “what’s the average,” etc., we need to summarize our data. So we’ll click the Summarize button to open the sidebar where we can pick how we want to summarize this data. The “Count of rows” metric is selected by default which is great since we want to count the total number of rows that match our filter.
Okay, cool — we’re ready to ask our question, so let’s click Done!
So it looks like there were 16,309 orders, each with a subtotal greater than $40. Nice. Another way of saying this is that there were 16,309 records in the table that met the parameters we set.
Okay, so that’s pretty useful, but it would be even more useful if we could know in which months our customers placed these big orders. That’s not hard to do at all.
If we open up the Summarize sidebar again, below where we picked our metric, there’s a list of all the columns that we can use as groupings. The one we want is Created At because this will now give us a separate total count of orders over $40 for each month the orders were placed in (or “created at”). So we’ll select Created At, and Metabase immediately shows us a line chart of the orders over time.
If we want to quickly check the results in a tabular fashion, we can click the little toggle at the bottom center of the page to toggle from our chart to the data and back again.
Metabase can present the answers to your questions in a variety of ways. To change the visualization, just select one of the options from the Visualization sidebar. Click the Visualization button in the bottom-left to open it. Let’s choose the Area chart option.
Sweet! Looks like business is booming — up and to the right is always good.
You’ll notice that some visualizations aren’t the best way to show an answer to a question. If Metabase think that’s the case with a specific answer and visualization combination, that visualization choice will appear faded in the sidebar. For example, it wouldn’t make sense to show the total number of orders over $40 as a single bar graph, or as a map.
If you want, you can try playing around with your question, like changing the number 40 to a different number. To do that, just click on the filter badge below the page title.
You can use Metabase all on your own, but it becomes even more useful when you start sharing your answers with other people on your team or in your organization. The first step is saving some of your questions.
Sometimes you’ll find yourself asking certain questions again and again, whether it’s running regular reports, looking up something about an important segment of users, or just answering the same question for other people in your company. To keep from repeating the same set of steps each time you want to ask the same question, you can save your questions to use later.
To do this, click on the SAVE button in the top-right of the question builder screen.
Metabase will take a stab at giving your question a meaningful name, but you can (and should) use your own naming convention that’ll help you and others find your questions later on after amnesia has sunk in. You can also pick which folder, or “Collection,” to save your question in.
Once you’ve saved your question, Metabase will ask if you want to add it to a new or existing dashboard. Let’s click Create new dashboard and give that a try. You’ll see a dialog that prompts you to create a new one and give it a name and description. Name it anything you’d like. We’ll call ours “My First Dashboard.”
Dashboards are great when you have a set of answers that you want to view together. Your saved questions will be displayed as cards on the dashboard, which you can resize and move around to your heart’s content.
So, after you click the button to create your dashboard, you should see your chart as a little card.
You can move and resize your chart so you can get it looking just how you want it. Just click Save in the top-right when you’re done. We’ll make ours a bit wider to let those data points breathe.
One other thing: once you’ve asked a question or saved a dashboard, the URL in your browser will link directly to that question or dashboard. That means you can copy and paste that URL into an email or chat and let other people see what you’ve found. This will only work if Metabase is installed on a shared server, and will require creating Metabase accounts for the people you want to share with.
Which type of charts and graphs should you use to best communicate insights from data? This guide will help you pick the right visualization for the job.
Picking the right chart comes down to two questions: what does the data look like, and what are you trying to communicate?
Metabase takes care of a lot of the details (like minimizing chart junk) so you can focus on what you want to communicate with your visualization. And for simple and custom questions, Metabase will guess at the appropriate chart to display. For example, if you pick a metric, like the count of orders, and group those orders by time, Metabase will automatically select a line chart that plots the order count at each interval. While Metabase guessing the right chart type is nice, it’s not going to work every time: some visualizations require additional input (for example, Metabase can’t automatically know to display a progress bar, as you need to tell Metabase what the goal should be).
Native queries, however, are a different story. Metabase will always return results as a table, so if you need something other than a table, you’ll have to select a visualization type yourself. Metabase also put some guardrails in place; for example, if you don’t have geographic data in your results (like coordinates or State), Metabase will gray out the Map viz. But don’t get hung up on picking just a single visualization—you can always build a dashboard to show data using multiple charts.
Table
Line Charts
Before we get into it, we should note: you don’t have to use every chart type to do proper analysis. Most of the time you’ll only need the old standbys: tables and line charts.
Often you’ll want to see a lot of measures at once, list their exact values, and be able to sort those measures. Maybe you simply want to add or remove a few columns or add a couple of filters to make it easy for people to look up certain values. And that’s what tablets are for. Tables in Metabase are one of the most versatile visualization types, so check out our article on Everything you can do with table visualization.
If you additionally want to summarize groupings of rows (like seeing the annual subtotal in a grouping of quarterly results), or switch up the columns and rows, you’ll want to use a pivot table. Check out How to create a pivot table to summarize your data.
You’re also often going to want to present data as a time series to see how a particular measure changes over time (like a rolling 7-day average), and that’s when you reach for the line chart. Line charts give a simple shape to the data, making it easy to see if the numbers are trending up, or if they’re cyclical, or what the maximum value was for the past X weeks, and so on.
With that out of the way, let’s walk through some common scenarios to help you pick the right viz to communicate your findings.
You have a few options in this scenario:
Static number
Compared with a goal
Position in a range
For static numbers or at least a number that doesn’t change too frequently, use the (appropriately named) number visualization, which is good for at-a-glance values like the count of respondents in a survey. Keep in mind that a single number may lack context, so it’s best used on a dashboard that provides that, such as the number of surveys sent out or how many respondents we had last year.
But even then, you should consider using the trend visualization if your number can be broken out by time (see comparing one measure over time below).
But even then, would a line chart be better? With a line chart, you can get a better picture (literally) of how the value has changed over time. Or you could go with the best of both worlds: a dashboard with a trend chart for the latest value (and its change from the last time period), paired with a line chart showing the history of that value.
If you want to see a metric in the context of a goal, or limit, or other threshold, use a progress bar.
If the context of that number is a scale or range, use a gauge. Metabase will pick three partial ranges across the full range of values, but you can adjust the sizes of these ranges, or add additional ranges, and label them however you like.
Now let’s see our options when we throw another variable into the mix.
Often we want to see how multiple values stack up against each other. The most common comparison is a single metric’s performance over time (how last week compares with the previous week, for example). But you’ll also frequently compare a metric across other dimensions, like sales across different product categories.
Static comparisons
One measure over time
Multiple measures over time
Against a goal or benchmark over time
For measures that won’t change, like responses on a survey or an annual report, you can compare values with a bar chart (sometimes called a column chart). If you have a lot of different items you need to compare, you should play around with switching to a row chart to see if that makes the bars more legible. For more, see Master the bar chart visualization.
When you want to compare and emphasize two sequential values of a metric, like this week’s value vs. last week’s, you can use a trend chart, which is essentially a time series in a box, showing the current value of the metric, and the previous value of that metric at whichever interval you’re tracking (last hour, day, week, etc.).
If you don’t need to emphasize the most recent delta, consider a time series instead so people can see the shape of the metric over time (especially useful if the most recent data is uncharacteristic of larger trends). Trends can also be good for situations in which teams look at a metric every week and know roughly its behavior; the trend viz is a convenient way to keep them posted on the latest numbers, like when throwing numbers up on a TV.
Line charts are the classic format for time series, but you can also present series values as a bar or area chart.
You could overlay two time series on a single line chart, with each line sharing the y-axis. If your measures have really different scales or units of measurement (say, dollars vs. quantity), then you could use a combo chart with two y-axes, to highlight this difference.
All you need to do here is add a goal line to your time series chart. You can also use goal lines to set up alerts, making them even more useful.
You’ll sometimes what to see how two different measures correlate.
The basic way to see a relationship is to plot one variable along the x-axis and one along they, and see if a pattern emerges. That’s a scatterplot. You’ll often see scatterplots used with data that hasn’t been summarized or aggregated, so that each point on the chart represents an individual record in the data—a single entry, person, session, specimen, etc.
If you want to introduce a third variable, you could change the size of each dot to reflect the value of the additional variable, turning a scatterplot into a bubble chart. In this case, we’re telling Metabase to set the size of the dot to fit the product’s average rating.
A breakout shows the composition of a measure—how our sales break out by category, for example.
Metric with two or three parts
Accumulating values
Step by step
Categorical breakout over time
Pie or donut charts are good at showing how two or three parts make up a whole. The reason pie charts only work for two or three things is that any more than that and people start having a hard time comparing the relative proportions of the different parts. In that case, it’s better to reach for a bar or row chart.
If you’re trying to visualize an accumulation, and when that value contains both positive and negative components, you’ll want to go with a waterfall chart. With Waterfall charts, you can include a total at the far right to display the cumulative value of the constituent inputs—each of the bars leading up to the total.
To see how a value drops off through a process, and at which step, you can use a funnel chart.
Funnel charts can also show the composition of a population, for example, a starting population where each step is an education level that further winnows that population: high school, bachelor’s, post-graduate, and so on.
You can also use a bar chart to plot the steps. Here’s a neat trick: on a dashboard, you can combine scalars to form a bar or funnel chart. All you need to do is calculate the measure at each step, then add them together on a dashboard card (just remember to add each step in sequence).
If you need to show how a number changes over time, and show the composition of that number at each interval, then consider using a stacked area or stacked bar chart. For example, let’s say we want to know both the total revenue (defined here as the sum of order ---> Total), as well as how that revenue splits among our four product categories, Doohickey, Gadget, Gizmo, and Widget.
If you’re just trying to see how different categories change relative to each other over time, regardless of that count, you could use a stacked bar chart set at 100%.
The classic distribution chart is the histogram, which is basically a bunched-up bar chart that bins values across a range, like taking the ages of each customer, splitting the customers up into age ranges, and counting the number of customers in each age range. Histograms are helpful for gaining insights into things like how much of an item people are likely to buy, the price range they are likely to purchase within, or even the time of year that most people make purchases.