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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
davyqliks
Specialist
Specialist

how to add a Sequential line number to each line in invoice

I am loading data from 2 sources, one is historic data with only line number and new daily files with Invoice number and an invoice line number.

I am receiving the same data in both files on some occasions and need to make the Historic have unique lines so i can load with no duplication.

I would like to add a sequential number to the historic load and have found this:

AutoNumber([Invoice no.]) as SeqNo,

but this adds a 1 to each line in a line number e.g.

Invoice no   seqNo

123                 1

123                 1

123                 1

123                 1

124                  2

124                  2

124                  2

etc..

But i require

123        1

123        2

123       3

123       4

124       1

124       2

124      3

 

Is there a way of achieving this in the load?

Thank you in advance for any offerings on this.

Daniel

Labels (2)
1 Solution

Accepted Solutions
Kushal_Chawda

you need to use autonumber like below

autonumber(RowNo(),[Invoice Number]) as Seq

View solution in original post

3 Replies
Taoufiq_Zarra

Hi,

Maye be RowNo()

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Kushal_Chawda

you need to use autonumber like below

autonumber(RowNo(),[Invoice Number]) as Seq

davyqliks
Specialist
Specialist
Author

Hey Kush,

Works a treat... Thank you so much.

Daniel