
This usage of attribute comes up a lot within the context of data modeling and when designing entity relationship diagrams. In relational databases, people often use attribute synonymously with column or field, like how a product’s Category is an attribute of (or describes) that product. That something might be a table, but attribute could also refer to a characteristic of a specific record, like user attributes in Metabase. Basically, an attribute is a characteristic of something. People in the data world use “attribute” in a few different contexts, so we’ll do our best to disambiguate here. In some Metabase plans, user attributes are used to restrict which data people can access.Īn attribute is a property that describes or identifies some entity. Using this visualization, we can understand both the rise and fall of individual product categories and how orders have performed as a whole:Īn attribute is a property that describes or identifies some entity. Similar to a stacked bar chart, stacking data on an area chart works best if you have a small number of categories to track - too many and your area chart will start to get chaotic or unreadable.įigure 1 shows Orders broken by out by Product → Category, visualized as a stacked area chart. You’re measuring a large number of subcategories within one chart. Your data is highly volatile, subject to frequent and/or significant swings. You’re only measuring a single series over time. Your data contains too many x-axis data points for a stacked bar chart.Ĭonsider a different visualization, like a bar or line chart, if: You need to represent volume and changes in volume over time. 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.
