Expressing the Range Argument

The Range argument refers to view-time expanded rows and columns, on which calculations are performed after suppression. Sorting is performed after calculation is completed.

Table 17. Range Notation

Type

Notation

Description

Example

None

 

The Range argument is optional.

This row expression points to all expanded rows in row segment 2. row[2]

Note:

This ensures compatibility with earlier releases.

Single Range

[segment (range)]

Refers to the single expanded row or column.

This expression points to expanded row 5 in segment 2:

row[2(5)]

Consecutive Range Reference

[:]

Refers to a range of expanded rows or columns.

This expression points to expanded rows 5,6,7,8,9,10 in row segment 2:

row[2(5:10)]

Nonconsecutive Range references

[,]

Refers to multiple single expanded rows or columns.

The following example points to expanded rows 5, 7, 8 and 10 in row segment 2:

row[2(5,7,8,10)]

If a range is used, you can use any combination of the above range notations.

Example:

Point to expanded rows 5 through 10 in design-time row 2:

row[2(5:10)]

Note:

If row segment 2 expands to 15 rows, the function operates on only expanded rows 5 through 10.

Example:

Identify columns C through E in design-time column A:

column[A(C:E)]

Example:

Point to expanded rows 1, 3, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15 and 17 in design-time row 2:

row[2(1,3, 5:10, 12:15, 17)] 

Note:

When the grid contains suppression properties, expanded rows and columns may be suppressed. For information on suppressing data, see Conditional Suppression.

If the Range argument refers to a number of expanded rows that is greater than the maximum number of rows expanded in the segment, the extra rows are ignored.

Example:

In the following example, expanded rows 6 through 10 are identified, but segment 1 contains only 3 expanded rows. In this situation, the function works only on expanded rows 6 through 8:

row[1(6:10)]

If none of the expanded rows in the Range exist, the entire axis reference is ignored.

Example:

Ignore the reference to 23 if segment 3 only contains 10 expanded rows:

row[3(23)]

Example:

If you enter a larger starting range than ending range, the system internally switches them around.

Example:

Show how the range is reversed:

row[1(7:5)] becomes row[1(5:7)]

Multiple references to the same expanded rows or columns are valid. However, this may cause the same rows or columns to be included twice in an expression.

Example:

Sum expanded row 5 twice:

row[2(3,5,7,5)].sum 

Example:

Specify expanded rows 3, 4, 5, 6, 7, and row 5. It includes row 5 twice in the calculation of the average:

row[2(3:7,5)].ave