Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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