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: 
RHZ123
Contributor
Contributor

séquence

Hello everyone

 

I have an input file with 2 columns (id, type), for the same id we can end up with the same type, like this:

id = 1 -> type = 'A'

id = 2 -> type = 'C'

id = 1 -> type = 'A'

id = 1 -> type = 'A'

id = 3 -> type = 'H'

id = 5 -> type = 'K'

id = 1 -> type = 'E'

.

.

.

And so on

 

So there is a management rule that says that:

 

for a type equal to 'A' return '300'. If a second type = 'A' exists for the same id return 301. If a third type = 'A' exists for the same id return 302, ... so on. kind like a sequence

I already started using the taggregateRow component to group on id and type and I add a 3rd column to the taggregateRow component output that counts the number of tpye for an id, and then I do not know too much I will continue


it will be really nice if someone can help me the top

Labels (2)
1 Reply
akumar2301
Specialist II
Specialist II

you can use routine

 

Numeric.sequence(row1.Type,300,1)

in this case if row1.Type=A

1st occurrence of A , will be 300

2nd occurrence of A , will be 301

...

 

Same if row1.Type=B

1st occurrence of B , will be 300

2nd occurrence of B , will be 301