0 Replies Latest reply: Oct 15, 2014 3:55 PM by qlik learner

# Rowno( ) and Recno( )

Hello All,

What is difference between Rowno( ) and Recno( ).

QV

• ###### Re: Rowno( ) and Recno( )

Have a look it is from help and see the difference.

RecNo( )

Returns an integer for the number of the currently read row of the internal table. The first record is number 1.

RowNo( )

Returns an integer for the position of the current row in the resulting QlikView internal table. 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 Concatenation to another. The first row is number 1.

Examples:

Raw data tables:

 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 QlikView internal table:

 QVTab A B RecNo( ) RowNo( ) 1 aa 1 1 3 ee 3 2 4 yy 2 3 6 zz 3 4
• ###### Re: Rowno( ) and Recno( )

What is difference when both creating the same numbers.

• ###### Re: Rowno( ) and Recno( )

It is not different see with the example

T1:

[

A,B

1,aa

2,cc

3,ee

];

NoConcatenate

qvtab:

LOAD *,RecNo( ),RowNo( ) Resident A Where A<>2;

DROP Table T1;

When you read the table T1 with A <> 2 then you get below table

Where you see Recno() has only 1 and 3 but Rowno() gives total row loaded in the table.

 A B RecNo() RowNo() 1 aa 1 1 3 ee 3 2
• ###### Re: Rowno( ) and Recno( )

RecNo( )

Returns an integer for the number of the currently read row of the source data table. The first record is number 1.

RowNo( )

Returns an integer for the position of the current row in the resulting QlikView internal table. 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.