Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Changing the starting number for Autonumber()?

Hi guys!

I am facing the need to have my data's rather random collection of IDs in a sequencial manner and thought I'd use the autonumber() function. However, I need the sequencial numbering to start from 0. Is it possible to change the starting value of Autonumber()? Or do I need to do a "Autonumber() -1" so to say?

All the best

//Nathalie

1 Solution

Accepted Solutions
Highlighted

I think AutoNumber() - 1 would be the only option... but what is your concern with AutoNumber() - 1? Also, AutoNumber tends to be slow and I have seen people mentioning that Peek()/Previous() give better performance....

View solution in original post

2 Replies
Highlighted

I think AutoNumber() - 1 would be the only option... but what is your concern with AutoNumber() - 1? Also, AutoNumber tends to be slow and I have seen people mentioning that Peek()/Previous() give better performance....

View solution in original post

Highlighted
Not applicable

Thanks, Sunny. 😃
As with many thinks in Qlik I was: 1. concerned about potential pitfalls in doing so and 2. thought that maybe there was a smarter way, i.e. built-in attributes to add to other functions.

Autonumber()-1 did the trick.

Have a great day