EXCLUDE modifier

  • 15 July 2022
  • 0 replies
  • 125 views

Userlevel 3
Badge

Description

Excludes data from a block(Metric or List Property) that meets the criteria set up in the Modifiers parameters.

 

Syntax

source_property[EXCLUDE: filtering_expression]
source_metric[EXCLUDE: filtering_expression]

 

Return type

same as source object

 

Examples

Case

Results

Filtering off of Multiple Conditions 
Revenue[EXCLUDE: Country = Country."FR" AND Product = Product."Product 1"] Returns the Revenue of any country but France for any product but Product 1

Revenue[EXCLUDE: Country = Country."FR" OR Country = Country."UK"]

Returns the Revenue of any country but France and UK.

 Filtering off of defined values

Revenue[EXCLUDE: Revenue > 1000]

Returns the Revenue by its original Dimensions only if the Revenue is lower than 1000 or blank.

Revenue[EXCLUDE: Cost > 1000]

Returns the Revenue by its original Dimensions only if the Cost is lower than 1000 or blank.

Filtering off of data in another Metric 

Revenue[EXCLUDE: 'Filter Metric']

Returns the Revenue by its original Dimensions only if the boolean Filter Metric is set to false or blank.

Excel equivalent: none

 

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 to not bring in.   

[FILTER: NOT condition OR ISBLANK(condition)]  is the same as   [EXCLUDE: condition]

The difference is how they handle Blanks. Given the Scenario above, it is recommended to use EXCLUDE for readability and performance issues.   

 

See also: BY, ADD, REMOVE, FILTER


0 replies

Be the first to reply!

Reply