Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Adding a Sequential numbers Column

Hi all,

I have a simple excel sheet loaded by the following code:

load
Name, Address
from [.\Names.xls]
(biff, embedded labels, table is Sheet1$);

I'd like to add a column which is an auto generated sequential number.

Table in Excel:
Name Address
Simon City1
Peter City2
Farah City3

Required Table in QlikView:
RrdID Name Address
1 Simon City1
2 Peter City2
3 Farah City3

1 Solution

Accepted Solutions
disqr_rm
Partner - Specialist III
Partner - Specialist III

Use RowNo() function in your chart expression and drag it to make it first column in your chart (if it has to be first column).

If you have subtotals in your chart, you may have to use RowNo(Total). Just play with it and you would know.

Hope this helps.

View solution in original post

8 Replies
Not applicable
Author

Apologies for being cheeky, but why not add this number in Excel?

Not applicable
Author

Because actually data sources are from multiple files joined into one table in Qlikview. I just wanted to make my question simple and clear.

disqr_rm
Partner - Specialist III
Partner - Specialist III

Use RowNo() function in your chart expression and drag it to make it first column in your chart (if it has to be first column).

If you have subtotals in your chart, you may have to use RowNo(Total). Just play with it and you would know.

Hope this helps.

Not applicable
Author

Thanks Rakesh for your answer.

But actually, I want the numbers in the table-level, if possible.

disqr_rm
Partner - Specialist III
Partner - Specialist III

oh! I misunderstood. Try this:

load

RecNo() as RecordNumber, Name, Address

from [.\Names.xls]

(biff, embedded labels, table is Sheet1$);

Not applicable
Author

Unluckily it didn't work.

Following is what I tried and got:

Code:
T2:
LOAD RecNo() RID,
CUST_ID as CUST_ID,
CUST_NAME as CUST_NAME2
FROM

(biff, embedded labels, table is CUSTS2$);

Error Returned:
Syntax error, missing/misplaced FROM:
T2:
LOAD RecNo() RID,
CUST_ID as CUST_ID,
CUST_NAME as CUST_NAME2
FROM

(biff, embedded labels, table is CUSTS2$)

llauses243
Creator III
Creator III

is ...

T2:
LOAD RecNo() RID,

must be ..

T2:
LOAD RecNo() as RID,

llauses@llauses.com

Not applicable
Author

yes you are right.