11/2/2023 0 Comments Metabase database support![]() You can use parentheses, ( ad ), to group parts of your expression.įor example, you could create a new column that calculates the difference between the total and subtotal of a order: =. ![]() Use +, -, * (multiply), / (divide) on numeric columns with numeric values, like integers, floats, and double. Functionsįunctions, by contrast, do something to each value in a column, like searching for a word in each value ( contains), rounding each value up to the nearest integer (the ceil function), and so on. So while you could create a custom column with the formula +, you could not write Sum( + ), unless you were creating a custom metric expression (that would add up all the subtotals and taxes together). Aggregations functions can only be used in the Summarize section of the notebook editor, because aggregations use values from all rows for that column. AggregationsĪggregations take values from multiple rows to perform a calculation, such as finding the average value from all values in a column. There are two basic types of expressions, Aggregations and Functions. You can check out a full list of expressions in Metabase, or walk through a tutorial that shows you how you can use custom expressions in the notebook editor. This page covers the basics of expressions. You could use = / to create a new column, which you could name “Item price”. = share( > 50) would return the percentage of orders with totals greater than 50 dollars. The expression = contains(, "Metabase") would filter for rows where the comment field contained the word “Metabase”. When using the query builder, you can use expressions to create new: To use custom expression, create a Custom Column (where the custom expression is used as a Field Formula to calculate values for the new column), or click on Filter or Summarize and select Custom Expression. Custom expressions to create filters, metrics, and custom columns You can also skip to the complete list of expressions. They are the power tools in the notebook editor of the query builder that allow you to ask more complicated questions. Custom expressions are like formulas in spreadsheet software like Excel, Google Sheets, and LibreOffice Calc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |