Custom expression
What is a custom expression?
A custom expression in Metabase is a formula that uses functions and mathematical operators to allow for more complicated questions, similar to a formula in spreadsheet software. You can include custom expressions in questions asked via Metabase’s query builder.
Custom expressions give those GUI questions more power and flexibility, without requiring you to write a full SQL query. You can write custom expressions to create custom columns, or to create more advanced filters and aggregations.
Example custom expression in Metabase
The example below shows the creation of a custom column that categorizes Orders
according to their Subtotal
using the case function.
Figure 2 shows the resulting table, with our new custom column on the right: