Excludes data from an expression (Metric, Property or formula result) based on cells position or values.
Filtering_expession being a boolean expression.
same as source object
|Filtering off of Multiple Conditions|
| ||Returns the |
| || |
|Filtering off of defined values|
| || |
|Filtering off of data in another Metric|
| || |
Excel equivalent: none
Filtering on values with “CurrentValue”
Filtering based on the values of the “expression” is a common use case. The simplest way of doing it is to duplicate the expression in the filtering expression.
Revenue[EXCLUDE: Revenue > 1000]
However, sometimes the expression filtered can be long. ex:
(‘Bloc A’ + ‘Bloc B’ + ‘Bloc C’ - ‘Bloc D’)[EXCLUDE: (‘Bloc A’ + ‘Bloc B’ + ‘Bloc C’ - ‘Bloc D’) > 1000]
Pigment offers a specific keyword:
CurrentValue. This keyword represents the expression on which the filter is applied, but in a much shorter and readable way, avoiding also copy-paste mistakes.
The previous formula can be written:
(‘Bloc A’ + ‘Bloc B’ + ‘Bloc C’ - ‘Bloc D’)[EXCLUDE: CurrentValue > 1000]
When to use EXCLUDE vs FILTER
The FILTER and EXCLUDE modifiers have very similar functionalities just an opposite approach. When using FILTER you are defining which data to bring, while EXCLUDE you are defining which data not to bring in.
[FILTER: NOT condition OR ISBLANK(condition)] is the same as
The difference is how they handle Blanks. Given the scenario above, it is recommended to use EXCLUDE for readability and performance issues.
More of a hands-on learner?
Talk to your Customer Success Manager about downloading the Functions and Modifiers in Pigment Application into your workspace. It includes examples of every Function and Modifier in Pigment!