


You’re plotting multiple subsets of data that, together, make up some total value. In an area chart, you still have a line that connects data points (usually plotting change over time), but by filling in the area between that line and the x-axis, you’re highlighting both the data’s relationship to zero and the relationship of any subcategories to a total. You can think of an area chart as a cross between a standard line chart and a bar chart. Performing an aggregation in the query builder: average price of products grouped by product category.Ī type of line chart where the space between plotted values and the x-axis is filled in with a solid color.Īn area chart is a type of line chart where the space between plotted values and the x-axis is filled in with a solid color. If we wanted to execute that same aggregation in Metabase’s query builder, we’d Summarize by Average of Price, and then group by Category, like in the image below:įig.

Just like we wanted, we’ve calculated the average of values in the Price column of our Products table, and grouped those averages according to their value in the Category field. In this case, we’ll use the Products table. Using Metabase’s Sample Database, let’s say we wanted to know the average price of our products, grouped by product category. STDEV() – Calculates the standard deviation of values in a field. SUM() – Returns the sum of values in a field. MAX() – Identifies the maximum value in a field. MIN() – Identifies the minimum value in a field. Summary tables can be especially useful when working with large datasets since summary tables are precomputed, queries that rely on them can run much faster.ĭifferent databases have different sets of functions, but here are some of the most common aggregate functions that you’ll encounter:ĬOUNT() - Counts the number of rows in a table.ĪVG() – Computes the average of values in a field. Aggregation is the process of collapsing those values into a single result, and is usually performed in conjunction with grouping - that is, combining multiple rows based on a certain value, like grouping by a dimension (e.g., a product category or country).Īggregations can be calculated on the fly, but you may also want to create summary tables with your results and save the results of those aggregate functions for future use. Individual values in a field may not hold much meaning on their own, but when we combine these values in some specific way, we can paint a more comprehensive picture of our data. The resulting number is often called a metric, which is distinct from metrics in Metabase. The act of summarizing data with a mathematical function, such as a averaging the values in a column, or counting the number of rows in a table.Īn aggregation is the act of summarizing data with a mathematical function, such as averaging the values in a column, or counting the number of rows in a table.
