Professional Documents
Culture Documents
Agenda
Sum( Sales )
1. Set Identifiers
2. Set Operators
3. Set Modifiers
Set Analysis – How?
• The syntax is broken down into 3 categories:
1. Set Identifiers
Sum( { 1 - $ } Sales )
Sum( {BM01} Sales )
Set Identifiers
0 - Represents an empty set
1 - Represents the full set of all the records in the application
$ - Represents the records of the current selections
$1 - Represents the previous selections
$_1 - Represents the next (forward) selections
Bookmark01 - Represents the bookmark id or the bookmark name.
Set Identifiers
Examples:
Sum({1} Sales)
Returns total sales within the application, disregarding the selections but
not the dimensions.
Sum({$} Sales)
Returns sales for the current selections i.e. the same as Sum(Sales)
Sum({Bookmark01} Sales)
Returns sales for the bookmark named “Bookmark01”
Set Analysis – How?
• The syntax is broken down into 3 categories:
1. Set Identifiers
2. Set Operators
+ Union Returns the set of all the records that belong to the
unioned sets.
- Exclusion Returns records that belong to the first but not the other
of the two set identifiers.
* Intersection Returns records that belong to both of the set identifiers
/ Symmetric Returns a set that belongs to either, but not both of the
Difference set identifiers.
Set Operators
Precedence:
1. Unary Minus (-)
2. Intersection and symmetric difference ( * , / )
3. Union and Exclusions
Sum( { 1 - $ } Sales)
Returns sales for everything excluded by the current selections.
1. Set Identifiers
2. Set Operators
3. Modifiers
sum( {$<Year = {2000}, Region = {US, SE, DE, UK, FR}>} Sales )
Set Modifiers
A set can be modified by additional or changed selections. Such
a modification can be written in the set expression.
Examples:
sum( {$–1<Product = {“*Internal*”, “*Domestic*”}>} Sales )
returns the sales for current selection, excluding transactions pertaining to
products with the string ‘Internal’ or ‘Domestic’ in the product name.