Skip to main content Skip to complementary content

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.

Syntax:  

RowNo([TOTAL])

Return data type: integer

Arguments:  

Argument Description
TOTAL

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.

The TOTAL qualifier may be followed by a list of one or more field names within angle brackets <fld>. These field names should be a subset of the chart dimension variables.

See also: Defining the aggregation scope

Limitations:  

In contrast to RecNo( ), which counts the records in the raw data table, the RowNo( ) function does not count records that are excluded by where clauses and is not reset when a raw data table is concatenated to another. The first row is number 1.

Examples and results:  

Examples Results

if( RowNo( )=1, 0, sum( Sales ) / Above( sum( Sales )))

The first row is number 1.

Example: Concatenating tables and counting rows when records are excluded

Tab1.csv:

A B

1 aa

2 cc

3 ee

 

Tab2.csv:

A B

5 xx

4 yy

6 zz

 

QVTab:

LOAD *, RecNo( ), RowNo( ) from Tab1.csv where A<>2;

LOAD *, RecNo( ), RowNo( ) from Tab2.csv where A<>5;

 

The resulting Qlik Sense internal table:

A B RecNo() RowNo()
1 aa 1 1
3 ee 3 2
4 yy 2 3
6 zz 3 4

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!