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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Moe1
Contributor II
Contributor II

Serial ....

Hi, I have an excel that has 1 column: ID

I want to load it in a table that has 2 columns: ID and Serial

The ID is straight forward from excel... But I want to load in the serial something like this:

- If same ID has more than one entry (for example 3 entries), it should be like this:

ID    Serial

1      001

1      002

1      003

 

While if the next ID is different I want to reset the serial to 001:

ID    Serial

1      001

1      002

1      003

2      001

3      001

3      002

4      001

5      001

etc....

 

 

Labels (2)
4 Replies
TRF
Champion II
Champion II

Use something like that in a tMap to fill the Serial field:

Numeric.sequence("Id", 1, 1)

This will generate as specific sequence for each value of the Id field.

That's what you need.

Moe1
Contributor II
Contributor II
Author

Thank you, yes Im using it but how to reset it when you encounter different ID

TRF
Champion II
Champion II

Sorry,

 

Assume the flow is row1, use this:

Numeric.sequence(row1.Id, 1, 1)

The sequence name will change each time the id value change.

TRF
Champion II
Champion II

Did this answered your case?
If so, don't hesitate to mark this topic as solved.