Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Generate Sequence

Hello!

Help me please ...

I have the following table and need to create a new column with a numeric sequence according to the amount of photos of each product.

tab1.jpg

I wish the results were as shown below:

tab2.jpg

1 Solution

Accepted Solutions
luciancotea
Specialist
Specialist

LOAD idProduct,

          urlPhoto,

           if( peek(idProduct) = idProduct, peek(Sequence)+1, 1) as Sequence

RESIDENT photos;

View solution in original post

3 Replies
luciancotea
Specialist
Specialist

LOAD idProduct,

          urlPhoto,

           if( peek(idProduct) = idProduct, peek(Sequence)+1, 1) as Sequence

RESIDENT photos;

Not applicable
Author

Thank you!

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think much easier is

autonumber(Recno(), idNumber) as Sequence

-Rob