Exclude Attribute Values From Filters
Learn how to build an exclusion filter criteria and the exclusion filtering rules.
Attribute values and exclusion
Attribute values can be arranged into multiple levels, where each level represents a specific category or class. For example, the Location Hierarchy attribute can arranged into the following levels: Region, Country, State, and City. This structure allows you to view data at different granularities. This also means you may have to drill through multiple levels to find the value you want to include or exclude when filtering.
Think of multi-level attributes as a tree-like structure made up of elements called nodes, which are connected by edges, as shown in the following illustration.
Here are some key terms that you'll need to know to understand how the exclude option works. For more information, see Exclusion rules.
Term | Description | Example |
---|---|---|
Root | The node at the top of the tree. | Overall is the root of the tree. |
Parent | A node that is directly connected to another node. |
|
Child | A node that has a parent. |
|
Siblings | Nodes that share the same parent. |
|
Path | Sequence of nodes and edges from one node to another. | The path from the root to New York is: Overall > North America > United States > New York. |
Ancestor | The nodes that are at higher levels on a path for a given node. | If the given node is United States, its ancestors are Overall and North America. |
Descendant | The nodes that are at lower levels on a path for a given node. | If the given node is United States, its descendants are New York and California. |
Exclusion rules
The following rules are applied when attribute values are excluded.
Sibling values can only be included or excluded.
For example, if you've excluded values (North America and South America) at the Regional level, you cannot add an include criteria for other values at this level. If you switch to the Include option, the exclusions will be removed.
If a value is excluded, its descendants cannot be included.
For example, if you've excluded North America, you cannot add an include criteria for its descendants (for example, Canada, United States, New York, or California)
If the initial filter criteria is an exclusion, the root will be included.
For example, when you exclude North America as your initial selection, the Overall value will automatically be included. Overall is the root attribute value of the Location Hierarchy attribute.
When you exclude a value, all include criteria that has been applied to its ancestors will remain.
For example, let's say you've included United States.
When you add an exclude criteria for California, United States will remain included.
When excluding a value, its parent value will be included when both of the following conditions are met:
- An include criteria exists at a higher level.
- None of the ancestors of the value being excluded are already included.
For example, let's say you've included United States at the Country level.
When you add an exclude criteria for Vancouver at the City level, its parent British Columbia will automatically be included. This is because no ancestors of Vancouver (British Columbia, Canada, North America, and Overall) have been previously included.
When you remove an include criteria for a value that has excluded descendants, the exclusions will also be removed.
For example, let's say you've included United States and excluded its descendants: California and New York. When you remove the filter criteria for United States, the filter criteria for California and New York will also be removed.