Element reference modifiers

The element references can be filtered by appending a list of modifier names to the element range.

E.g. ‘sum(d-1, d1:0 (visible, siblings), m1)’ gives the accumulated sum of the first measure of the last column, but includes only the visible elements, and only the elements that are siblings to the current row.

As a shorthand, the abbreviation letter in the table below can be supplied instead of the entire name.

Visibility modifierShortDescription
alla

Both visible and hidden elements are included.

This is the default visibility filter.

visiblevOnly visible elements are included.
hiddenhOnly hidden elements are included.
Hierarchy modifierShortDescription
levell

Only elements on the same hierarchy levels in the dimensions as the current element are included.

This is the default hierarchy filter.

If an integer >= 0 immediately follows this filter name, e.g. ‘l2’, then only the values in level 2 are included, with level zero being the grand total.

siblingssOnly elements with the same hierarchy parents in the dimensions as the current element are included.
childrenc

Only elements that are nested inside the current element are included.  Please note that only data references can be used with this filter.

Example: This filter can be used with an if-then-else operator for making subtotals that only include the visible elements, when some elements have been hidden by a Visibility Agent:

if allcount(0,d1:d-1(c),m1) > 0 then sum(0,d1:d-1(v,c),m1) else sum(0,0,m1)

raggedr

This filter is useful e.g. for making an accumulation which follows the current expansion of single elements:

 

TimeTurnoverAccumulated
Total 750750
2000 500500
2001Total-400-400
Q1250750
Q23001050
Q3-500550
Q4-450100
2002 250350
2003 400750

 

Like with the ‘level’ filter, an integer >= 0 can follow this filter name, e.g. ‘r0’.  In ragged filter, however, this value is somewhat more complicated to explain:

Level zero are the leaf elements, i.e. the elements that have no children.  Level one are their parents.  In the example above, only 2001 is on level one.  Level two are the elements that have level 1 children (grand total above), etc.

leavesrlOnly elements with no children are included.  This is the exact same as ‘r0’.
Order modifierShortDescription
sortedo

Relative and data references are indexed according to the current sorting of the grid.

This is the default order filter.

unsorteduRelative and data references are indexed according to the order of the dimension values in the cube.
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.