Set modifiers with set operators
The selection within a field can be defined using set operators working on different element sets. For example the modifier <Year = {"20*", 1997} - {2000}> will select all years beginning with “20” in addition to “1997”, except for “2000”.
Examples and results:
Examples | Results |
---|---|
sum( {$<Product = Product + {OurProduct1} – {OurProduct2} >} Sales ) | Returns the sales for the current selection, but with the product “OurProduct1” added to the list of selected products and “OurProduct2” removed from the list of selected products. |
sum( {$<Year = Year + ({“20*”,1997} – {2000}) >} Sales ) |
Returns the sales for the current selection but with additional selections in the field “Year”: 1997 and all that begin with “20” – however, not 2000. Note that if 2000 is included in the current selection, it will still be included after the modification. |
sum( {$<Year = (Year + {“20*”,1997}) – {2000} >} Sales ) |
Returns almost the same as above, but here 2000 will be excluded, also if it initially is included in the current selection. The example shows the importance of sometimes using brackets to define an order of precedence. |
sum( {$<Year = {“*”} – {2000}, Product = {“*bearing*”} >} Sales ) |
Returns the sales for the current selection but with a new selection in “Year”: all years except 2000; and only for products containing the string ‘bearing’. |
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!