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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

[resolved] How to add sequence/running number of duplicate data

Hi,
i have problem with duplicate data but there'a a way to avoid this duplicated. by add new sequence data for each data.
example :
Name
AA
AA
AA
BB
CC
DD
DD
i need.
Name | SubName
AA | 1
AA | 2
AA | 3
BB | 1
CC | 1
DD | 1
DD | 2
i have tFileInputExcel (1 column) -> ?? -> tFileOutputExcel (2 columns)
How could i proceed? Please help.
Thanks,
Rebacca.
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Try this in tMap new field:
Numeric.sequence(row1.Name,1,1)

View solution in original post

6 Replies
Anonymous
Not applicable

Hi
You can use Numeric.sequence("s1",1,1) to generate a sequence number for each item on tMap. see my screenshots.
_AnonymousUser
Specialist III
Specialist III
Author

Hi,
I Hope your requirement is to remove the Duplicate data in the Input Excel File.
Then you may simply use the component tUniqRow.
The Screenshot follows.
_AnonymousUser
Specialist III
Specialist III
Author

i'm using tMap and Numeric.sequence. it works.
Big thanks. 0683p000009MACn.png
_AnonymousUser
Specialist III
Specialist III
Author

i have used that tmap and Numeric.sequence("s",1,1) and iam getting
aa 1
aa 2
aa 3
bb 4
bb 5
cc6
so i want output as 
aa 1
aa 2
aa 3
bb 1
bb 2
cc 1
how does it is possible? world you please help in this regard? @shong
Anonymous
Not applicable

Try this in tMap new field:
Numeric.sequence(row1.Name,1,1)
Muhammad_irtiza
Contributor
Contributor

@Ilya V​ I Have tried this but it will give me the below result:

A 1

A 2

B 1

C 1

B 2

how can I achieve the below result:

A 1

A 1

B 2

C 3

B 2