Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
MindaugasBacius
Valued Contributor III

Row number

Hello

Simple question.

I have a table:

DateInfo
2016-09-30

A

2016-10-31A
2016-11-30A
2016-09-30B
2016-10-31B
2016-11-30B

I do need this:

DateInfoNumber
2016-09-30

A

1
2016-10-31A2
2016-11-30A3
2016-09-30B1
2016-10-31B2
2016-11-30B3

Thank you

Tags (1)
1 Solution

Accepted Solutions

Re: Row number

May be like this:

AutoNumber(RecNo(), Info) as Number

5 Replies

Re: Row number

May be like this:

AutoNumber(RecNo(), Info) as Number

MindaugasBacius
Valued Contributor III

Re: Row number

Do you have any other solutions as this one increased the loading time dramatically?

I could live with this but I would like to be sure that this method is most efficient. Thanks.

Re: Row number

Not sure if this is going to be any better, but this is the other option. If the data is already sorted, then you might not need to create FinalTable and should be able to create Number field within Table.

Table:

LOAD Date,

    Info

FROM

[https://community.qlik.com/thread/235909]

(html, codepage is 1252, embedded labels, table is @1);

FinalTable:

LOAD Date,

  Info,

  If(Info = Previous(Info), RangeSum(Peek('Number'), 1), 1) as Number

Resident Table

Order By Info, Date;

DROP Table Table;

Highlighted
MindaugasBacius
Valued Contributor III

Re: Row number

This solution works faster.

Re: Row number

Did not know AutoNumber performed that poorly. Thanks for updating mindaugasbacius