Expressing the Segment Argument

The Segment argument is a value that represents a row or column ID in the designer. Referenced segments refer to design-time rows or columns, which might expand in the viewer. View-time rows and columns are the expanded rows and columns. You can use numbers for row IDs and letters for column IDs. You can refer to one or more segments in any standard formula..

Table -1 Notation Used for Multiple Segments in Standard Formulas

Type Notation Description Example
Single segment [ ] Single (design-time) segment Point to segment 2:

row[2]

Note:

Previous releases support this notation.

Nonconsecutive segment [;] Multiple single rows or column segments Point to segment rows 2, 5, 7, 8 and 10:

row[2;5;7;8;10]

Note:

Use a semicolon rather than a comma to delineate row or column references.

Segment Range [:] Range of rows or column segments Point to segment rows 2, 3, 4 and 5:

row[2:5]

The following examples show different combinations of the segment notation in Table -1.

Example 1:

Point to segment rows 1, 3, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15 and 17:

row[1; 3; 5:10; 12:15; 17]

Example 2:

If the following expression references row segment 20, but the grid contains only 15 row segments, the formula works only on segment 4:

row[4; 20]

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

Example 3:

Show how the segments are internally switched:

row[6:3] becomes row[3:6]

Multiple references to the same segments are valid. This causes the same segments to be included twice in an expression.

Example 4:

Sum row 5 twice:

row[2;3;5;7;5].sum 

Example 5:

Reference row segments 2, 3, 4, 5, 6, 7, and segment 5 again. Include segment 5 twice in the calculation of the average:

 row[2:7;5].avg 

Text segments are ignored.

Example 6:

Ignore row segment 3 if it is a text row:

row[1:5]