Skip to main content

Set modifiers with implicit set operators


Set modifiers with implicit set operators

The standard way to write selections in a set modifier is to use an equals sign. For example:

Year = {">2015"}

The expression to the right of the equals sign in the set modifier is called an element set. It defines a set of distinct field values, in other words a selection.

This notation defines a new selection, disregarding the current selection in the field. So, if the set identifier contains a selection in this field, the old selection will be replaced by the one in the element set.

When you want to base your selection on the current selection in the field, you need to use a different expression

For example, if you want to respect the old selection, and add the requirement that the year is after 2015, you can write the following:

Year = Year * {">2015"}

The asterisk is a set operator defining an intersection, so you will get the intersection between the current selection in Year, and the additional requirement that the year be after 2015. An alternative way to write this is the following:

Year *= {">2015"}

That is, the assignment operator (*=) implicitly defines an intersection.

Similarly, implicit unions, exclusions and symmetric differences can be defined using the following: +=, –=, /=

Examples: Chart expressions for set modifiers with implicit set operators