Custom expressions are formulas you can write in the built-in query builder to perform calculations, apply conditional logic, or build filters that go beyond the standard options. If you've used formulas in Excel or Google Sheets, the concept is the same: you combine functions, operators, and column references to produce a value.
Custom expressions can be used in three places:
- Custom Columns: to create a new column calculated from existing ones
- Custom Filters: to filter rows using conditions that the standard filter options don't support
- Custom Summations: to aggregate data using calculations like conditional sums
This article focuses on creating Custom filters.
To create a custom filter, click on the Editor button while viewing a saved question (report):
On the editor screen, click Filter:
Scroll down to the bottom of the filter options and click Custom Expression:
This opens the custom expression window. From here, enter your formula, and click Done:
Example: Filtering specifically for records where "Job Level" is "Manager" and the individual has a primary address in either Ohio, United States, or Ontario, Canada
The resulting filtered report:
Tip: while writing a custom expression, click the small f button to open the function browser, where you can explore all available functions and see how each one works:
Wicket's reporting solution is powered by Metabase. Additional documentation is available in the Metabase documentation.
Comments
0 comments
Article is closed for comments.