The basics of filtering data
You can limit the data you see in Centricity content based on criteria you specify. For example, you might want to filter the results to the last three months, or to only specific subcategories within a single category.
Any field in your Centricity instance can become a filter. There are two types of filters in Centricity:
Basic Filters — Most of the time you’ll use this type of filter. In these filters, Centricity provides appropriate drop-down lists, calendar widgets, and text fields you can use to put in your restriction.
Custom Filters — When you need to specify more detailed business logic (especially when you need to combine
ORlogic together), you can use custom filters.
You can use any combination of these filter types in your query.
There are a few different ways to add a basic filter:
Click the filter icon in the field picker (icon turns blue when filter is added)
Select “Filter” from a column’s gear menu
Click a dimension value to limit the query to that value
You’ll see that a filter appears in the Filters section above your results. To remove a filter, click the X to its right.
Standard types of filter options
The available options for the filter depend on its type. For example, a time dimension will have options to select a time range, while a numeric dimension will have options like equal to or greater than.
For text dimensions, Centricity helps you choose filter values by displaying a list of existing data values for that field. As you type, Centricity narrows the list to just those values that include that text.
When you type a filter value for a text dimension, Centricity preserves any leading or trailing spaces. For example, creating a filter that contains the text ” bath” would not match values that did not contain the leading space, such as “bath & shower.” However, the filter would match any values that contained the space before the word bath, such as “baby bath”.
If you copy and paste a value into a text filter, however, leading and trailing spaces are trimmed as part of the copy and paste process.
If you need to enter a special character in your filter, such as
", you can do so by adding a leading backslash (
\). For example, to filter on
Santa Cruz, CA, you would enter
Santa Cruz \, CA.
Entering multiple values into a filter, where appropriate, creates an
OR condition, meaning all of the values are applied to the filter.
If you would like to filter on a large set of values, you can paste a long list of values into the filter field. However, the maximum number of values you can paste may be limited by your browser or other elements along your network, and may be as small as 2,000.
+ to the right of a filter to add another option to the filter. The new option will appear as either an
OR condition or an
AND condition, depending on the type of filter option. For example, three filter options for Total Pulse could be:
is greater than, AND
is less than, OR
is not equal to.
If you need a more complex filter or set of filters, you can create a custom filter.
Custom filters let you create filters with custom conditions that might not be available with the other, simpler filter types. These conditions can be simple or complex. You write the fields, constants, functions, and operators that express the filtering that you want.
When you add a custom filter, Centricity displays an editor for you to build an expression that evaluates as true or false. When you run the query, Centricity will only return rows for which that condition is true.
Adding a custom filter
To add a custom filter, expand the Filters section and click the Custom Filter checkbox in the upper right.
To create a Centricity expression for your custom filter, start typing a dimension or function. Centricity will display a list of functions, operators, and field names that you might want to use in your expression. Click on a term in the drop-down to add it to your expression. When finished, your expression must evaluate to true or false.
Click Run (or use the keyboard shortcut Command-Enter for Mac or Ctrl+Enter for Windows) to run your query with your custom filter applied.
The Creating Centricity Expressions page explains how to create Centricity expressions and how the editor helps you.
Centricity expressions can use as many fields, functions, and operators as your business logic requires. Just keep in mind that the more complex your condition, the more work your database must do to evaluate it, which may lengthen query times.
Because custom filters are used to create a database query, you cannot refer to measures in a custom filter, or use any functions that rely on query results.
Removing a custom filter
To remove a custom filter, you can:
Xto the right of the expression to completely delete it.
Deselect the Custom Filter checkbox to stop using the expression. As long as you do not close the page, Centricity will remember what you have typed, and your expression will reappear if you click Custom Filter again.