Stack Overflow for Teams is a private, secure spot for you and For example, specify "Portland" or "Oregon" in the City field to filter for records containing either value. Dates, of course, are a special case; everyone knows the range of values, as time is just standard time. Already on GitHub? These are my cotrols: Data Source: Solicitudes Combo Box Name:cboColaboradores Items properties: Choices(Solicitudes.Colaboradores) --This shows a name list from a Sharepoint Lookup Field… Enter the first set of values, then click the Or tab at the bottom of the datasheet or form, and then enter the next set of values. Let’s say we want to create a SQL question that grabs all the orders from the orders table, but we want to give people the option to filter the results by category in the products table. Depending on whether you are working in Datasheet view or in Form view, do one of the following: Datasheet view: Click the first row in the column on which you want to filter, click the arrow that appears, and then select a value. The correct syntax for Field Filters omits the = operator: The reason for this shorthand is so that Metabase can, behind the scenes, handle the SQL code for situations like multiple selections, e.g., when a user selects multiple categories from a dropdown. Metabase does not support alternative calendars, or at least not yet: Metabase is open source, so if you want to add support for the Mayan calendar or whatever, go for it. We’ll cover the three basic input variables - Text, Number, and Date – in this article, and Field Filters in another article. To filter for records that have null (missing), non-null, blank (empty or ""), or nonblank values, type Is Null, Is Not Null, "", or Not "" in the field. To specify alternate criteria for a single field, type the first criterion in the Criteria row and the second criterion in the Or row, and so on. Hi! We’ll use the Sample Dataset included with Metabase to add a filter widget with a dropdown menu to a question written in SQL. If, however, you need custom SQL commands or functions, and you want your users to be able to filter the results of those questions…read on! To include a variable in your query, simply wrap the variable name in double braces, like this: {{ variable }}. 2. To switch to the unfiltered view of data, remove the filters by clicking Filtered on the record navigator bar to revert to the full view. The filters that are available to you depend on the data type in the selected column. Since the view you get after you apply a filter contains only records with the values that you selected, the rest of the data remains hidden until you clear the filter. Filter by form: To filter on several fields in a form or datasheet, or if you are trying to find a specific record. The current filter criteria set is displayed. We’ll occasionally send you account related emails. Hi, I’m using Metabase v0.28.5 and I created questions in two ways: custom option and native query. GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. When you filter multiple fields in a single view, the filters are combined by using the AND operator, like this: CountryRegion = UK AND month of BirthDate = April. @lucasloami Filter by Selection: To filter all the rows in a table that contain a value that matches a selected value in a row by filtering the datasheet view. Except for OLE Object fields and fields that display calculated values, all field types offer common filters. This article walks through how to create questions in Metabase using native SQL queries so that viewers of our questions can plug in values and filter the results. Admins can configure Field settings in the Data Model page of the Admin Panel. The filter field is included in the sql as an optional: [ [ company_id = { {company}} ]] and the filter field definition points to Filter Field type and pointing to the Name in the Companies table. Describe the bug SQL questions with Field Filter that reference a table that the user doesn't have access to does not work, when accessing the question directly (new tab). For example, to see birthdays that fall between the current date and the end of the year, click Between, and then specify the appropriate start and end dates in the Between dialog box.