RowNo - chart function

RowNo() returns the number of the current row within the current column segment in a table. For bitmap charts, RowNo() returns the number of the current row within the chart's straight table equivalent.

If the table or table equivalent has multiple vertical dimensions, the current column segment will include only rows with the same values as the current row in all dimension columns, except for the column showing the last dimension in the inter-field sort order.

Note: Sorting on y-values in charts or sorting by expression columns in tables is not allowed when RowNo() is used in any of the chart's expressions. These sort alternatives are therefore automatically disabled.



Return data type: integer


Argument Description

If the table is one-dimensional or if the qualifier TOTAL is used as argument, the current column segment is always equal to the entire column.

Defining the aggregation scope

Examples and results:  

Customer UnitSales Row in Segment Row Number
Astrida 4 1 1
Astrida 10 2 2
Astrida 9 3 3
Betacab 5 1 4
Betacab 2 2 5
Betacab 25 3 6
Canutility 8 1 7
Canutility   2 8
Divadip 4 1 9
Divadip   2 10
Examples Results
Create a visualization consisting of a table with the dimensions Customer, UnitSales, and add RowNo( ) and RowNo(TOTAL) as measures labeled Row in Segment and Row Number.

The Row in Segment column shows the results 1,2,3 for the column segment containing the values of UnitSales for customer Astrida. The row numbering then begins at 1 again for the next column segment, which is Betacab.

The Row Number column disregards the dimensions can be used to count the rows in the table.

Add the exression:

IF( RowNo( )=1, 0, UnitSales / Above( UnitSales ))

as a measure.

This expression returns 0 for the first row in each column segment, so the column will show:

0, 2.25, 1.1111111, 0, 2.5, 5, 0, 2.375, 0, and 4.

Data used in examples:


LOAD * inline [







Betacab|BB|1|25| 25





] (delimiter is '|');


Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?