Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

jblomqvist
Valued Contributor

Is RowNo function skipping first value by default?

Hi all,

I have the following table:

FullTable:

LOAD

    Num($(vMin)+ RowNo()-1) as Numbers1

AutoGenerate

    $(vMax) - $(vMin)+1;

This table generates all possible numbers from 1 to 100.

I've noticed that if I don't insert a -1 after RowNo() function above it starts from number 2.

And I have to do a +1 in order to get the last value.

Is it because RowNo() is by default gives you the next row rather than the first row value?

4 Replies
Not applicable

Re: Is RowNo function skipping first value by default?

RowNo() always starts at 1. If you dont write -1 your min numbers will be died.

sasiparupudi1
Honored Contributor III

Re: Is RowNo function skipping first value by default?

slight change to your script..

RowNo() starts from 1

set vMin=0;
set vMax=100;

FullTable:

LOAD

Num($(vMin)+ RowNo()) as Numbers1

AutoGenerate

$(vMax) -$(vMin)+RowNo();

sasiparupudi1
Honored Contributor III

Re: Is RowNo function skipping first value by default?

Hi

Have you managed to solve your problem?

Sasi

Arjunarao
Honored Contributor II

Re: Is RowNo function skipping first value by default?

Hi John,

Please close the thread if you got the solution. Thank you.