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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to Auto-Increment in tMap

Hi Guys,
Im trying to do something which I think is pretty simple but I cant get it to work.
Ive got for example, ids - a,a,a,a which increments from 1,2,3,4 using Numeric.sequence("s1 ",1,1), this is ok.
However when I move onto ids - b,b,b the increment continues to 5,6,7 while I need it to start from 1 again. Can someone please help?
Thanks,
Adrian
Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hello adrianorirl,
Create a variable (var2) with this expression :
Var.var2==0 || Var.var2>=4 ? 1 : Var.var2+1
I've tested it, it works well.
Regards,
JC