You can filter data displayed in a grid to reduce the amount of data shown, or to exclude data that you do not wish to see.

Filter Column Values

  • Click on a column name and select Filter.

Filter by Value

In some cases, the filter popup will have two tabs. If there is a Choose Values tab, you can directly select one or more individual values using checkboxes. Click on a label to select only a single value, add or remove additional values by clicking on checkboxes.

Filtering Expressions

Filtering expressions available in dropdowns vary by datatype and context. Possible filters include, but are not limited to:

  • Presence or absence of a value for that row
  • Equality or inequality
  • Comparison operators
  • Membership or lack of membership in a named semicolon separated set
  • Starts with and contains operators for strings
  • Between (inclusive) or Not Between (exclusive) two comma separated values
For a full listing, see Filtering Expressions.

  • Switch to the Choose Filters tab, if available.
  • Specify a filtering expression (such as "Is Greater Than"), and value (such as "37") and click OK.

You may add a second filter if desired - the second filter is applied as an AND with the first. Both conditions must be true for a row to be included in the filtered results.

Once you have filtered on a column, the filter icon () appears next to the columns title. Current filters are listed above the view; hover to reveal action buttons.

Notes:

  • Leading spaces on strings are not stripped. For example, consider a list filter like Between (inclusive) which takes two comma-separated terms. If you enter range values as "first, second", rows with the value "second" (without the leading space) will be excluded. Enter "first,second" to include such rows.
  • By default, LabKey filtering is case-sensitive. However, if your LabKey installation is running against Microsoft SQL Server, filtering is case-insensitive.

Persistent Filters

Some filters on some types of data are persistent (or "sticky") and will remain applied on subsequent views of the same data. For example, some types of assays have persistent filters for convenience; these are listed in the active filter bar above the grid.

Use Faceted Filtering

If a column contains 100 or fewer distinct values, then a pick list of faceted filters is provided in the filter dialog on the Choose Values tab (Provided that the column type is one of the following: Lookup, Boolean, Integer, Text, DateTime, or if the column is marked as a dimension). In the image below, the Language column has eight options; French is shown selected.

When applying multiple faceted filters to a data grid, the options shown as available in the panel will respect prior filters. For example, if you first filter the Demo Study demographics dataset by "Country" and select only "Uganda", then if you open a second filter on "Primary Language" you will see only "French" and "English" as options - our sample data includes no patients from Uganda who speak German or Spanish. The purpose is to simplify the process of filtering by presenting only valid filter choices. This also helps you unintentionally empty results.

Clear One or All Filters

To clear a filter from a single column, click on the column heading and select Remove Filter.

To clear all filters (and all sorts), click on the Clear All link that appears when you hover over the filter bar. Alternatively, click on any column heading and select Filter. In the filter dialog click the Clear All Filters button.

Advanced: Understand Filter URLs

Filtering specifications are included on the page URL. The following URL filters the demo study "Physical Exam" dataset to show only rows where temperature is greater than 37. The column name, the filter operator, and the criterion value are all specified as URL parameters.

https://www.labkey.org/study/home/Study/demo/dataset.view?datasetId=5004&Dataset.sort=ParticipantId&Dataset.Temp_C~gt=37

In general there is no need to edit the filter directly on the URL; using the filter box is easier and less error-prone.

The most recent filter on a grid is remembered, so that the user's last filter can be displayed. To specify that a grid should be displayed using the user's last filter settings, set the .lastFilter URL parameter to true, as shown:

https://www.labkey.org/Issues/home/Developer/issues/list.view?.lastFilter=true

Filter by Group

Within a study dataset, you may also filter a data grid by participant group. Click the Filter button on the left above the grid to open the filter panel. Select checkboxes in this panel to further filter your data. Note that filters are cumulatively applied and listed in the active filter bar above the data grid.

Related Topics

discussion

Discussion

Search 

Pages 

previousnext
 
expand all collapse all