Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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....
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....
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
Autonumber(RowNo(), [Field]) as Rownum cannot be used twice in the load script. It works the first time, but after that. No!