You can apply filters to a custom measure to enable the measure to limit the data included. For example, only including data from certain regions.
You can add a custom filter to a custom measure when you are creating or editing a custom measure.
- In the Field Picker, expand the Custom Fields section.
- Click Add and select Custom measure to create a new custom measure, or select an existing custom measure's More menu and select Edit to edit an existing custom measure.
- In the Filters tab, select the field that you want to filter by from the Filter name drop-down list.
- Select the existing condition button, which by default is any value, under Filter value to customize the filter conditions that you want to apply.
-
Select the condition, and enter or select a value.
To save the value, click outside the filter condition, or use the escape key.
- When available, value suggestions will appear in a drop-down list, which is indicated with a downward-facing arrow in the value input box, for users to select or search against. Suggestions are most commonly available for string fields.
- If you're editing an existing custom measure, consider changing the custom measure's name to reflect the filter condition.
- To add more filters, select the Add plus sign button in the Filter value section; to remove filters select the Remove minus sign button.
- Click the down arrow next to Custom filter at the bottom of the Filters tab to expand the Expression text box to add a custom filter instead of or in addition to a UI-based filter. Enter an expression in the Custom filter box using any functions and operators that can be used in custom filters. The expression editor will suggest field names and display syntax help for any functions you use. Fields that are both currently used and eligible to be used with the field type that you're creating are marked with a black circle.
- To select a format for the custom measure, select the Field details tab and then select the format option from the Format drop-down list.
- Click Save.
Parent topic: Using custom fields