Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
poluvidyasagar
Contributor II

Conditional Row Number

Hi,

I am trying to achieve this Row Number function in the script.

Actual Data:

ProductTime
A2/18/2019 6:45
B2/18/2019 6:49
C2/18/2019 6:45
D2/18/2019 6:49
E2/18/2019 6:52
F2/18/2019 6:52
G2/18/2019 6:55
H2/18/2019 6:55
I2/18/2019 6:59
J2/18/2019 6:59

 

I would like to generate a row number in order of increasing time column. So the result should look like this.

ProductTimeSeq
A2/18/2019 6:451
B2/18/2019 6:493
C2/18/2019 6:452
D2/18/2019 6:494
E2/18/2019 6:525
F2/18/2019 6:526
G2/18/2019 6:557
H2/18/2019 6:558
I2/18/2019 6:599
J2/18/2019 6:5910

 

I have this script:

Load 

Product,

Time,

RowNo() as Seq

From 

Data;

How do i put condition on the Row No() to get sequence in the form of time loaded.

I know we can do this using resident load. But any other way around this?

Thanks,
Vidya

Labels (1)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Conditional Row Number

I believe you will have to do a Resident Load with "Order By Time".  Only Resident supports the Order By. Alternatively, if you are loading the data with SQL SELECT you could put the Order By on the SQL. 

 -Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

1 Reply
MVP & Luminary
MVP & Luminary

Re: Conditional Row Number

I believe you will have to do a Resident Load with "Order By Time".  Only Resident supports the Order By. Alternatively, if you are loading the data with SQL SELECT you could put the Order By on the SQL. 

 -Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post