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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Antoine553
Contributor II
Contributor II

Add a Rowno() on many added tables

Hello

I have many xlsx file going from 2005 to 2020. I'm starting by loading the 2020.xlsx file and add the others by making a "ADD LOAD" one by one (they have some differences). At the end I have the table I want and can easily explain how to add the future one to my colleagues with the "ADD LOAD" commented above. However i can't manage to add an ID to every row since it reapeat itself when i put it at every table and dosn't cover every row if i put it at the begining/end.

Here's a demonstration :

table1:

LOAD * INLINE [
Field1, Field2
a, b
c, d
e, f
];

 

ADD LOAD * INLINE [
Field1, Field2
g, h
i, j
k, l
];

 

How can i add an ID to the final result of this (the files are really big) ?

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

So, for the sample above you want the row numbers to be 1 to 6, right? It seems to work when I use RowNo(). If you want 1 to 3, you can use RecNo()

table1:
LOAD RowNo() as RowNo,
	 RecNo() as RecNo,
	 *;
LOAD * INLINE [
    Field1, Field2
    a, b
    c, d
    e, f
];

Concatenate(table1)
LOAD RowNo() as RowNo,
	 RecNo() as RecNo,
	 *;
LOAD * INLINE [
    Field1, Field2
    g, h
    i, j
    k, l
];

image.png

View solution in original post

2 Replies
sunny_talwar

So, for the sample above you want the row numbers to be 1 to 6, right? It seems to work when I use RowNo(). If you want 1 to 3, you can use RecNo()

table1:
LOAD RowNo() as RowNo,
	 RecNo() as RecNo,
	 *;
LOAD * INLINE [
    Field1, Field2
    a, b
    c, d
    e, f
];

Concatenate(table1)
LOAD RowNo() as RowNo,
	 RecNo() as RecNo,
	 *;
LOAD * INLINE [
    Field1, Field2
    g, h
    i, j
    k, l
];

image.png

Antoine553
Contributor II
Contributor II
Author

thanks a lot