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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Auto Number function

Hi Everyone ,

Anyone please give me a scenario where we can apply the auto number() function with example.

I'm not getting how to use auto number() function and howz it work.

Thanks

5 Replies
adamwilson
Partner - Creator
Partner - Creator

If you have a key fields which is long or made up of several fields one way to make them shorter and less memory consuming is to use autonumber to assign an integer rather then a string,

eg

Load autonumber( Region&Year&Month, 'Ctr1' ) as %Key,

Region,

Year,

Month

From Table;

Not applicable
Author

hi Dhiraj

please find Attachment

and please go through  following  link 

Qlikview Notes: Autonumber() Key Fields and Sequential Integer Optimization

julian_rodriguez
Partner - Specialist
Partner - Specialist

Hello Dhiraj,

Autonumber function is very useful mostly for a data model's memory reduction.

For example, if your model has a key like %Pk_Customer_Product_City with 1,000,000 of different values like:

10010010_980099002_New York

10310010_980069002_London.... and so on...

Now, you may consider using autonumber(%Pk_Customer_Product_City) As %Pk_Customer_Product_City and it will change each distinct value for a different integer value...

1

2

3 ... .and so on...

In summary, I have used this function in order to reduce the memory usage, mainly with the PK fields.

Regards!

Anonymous
Not applicable
Author

Hi   qliklearn,

Thanks for the reply I understood ...

Anonymous
Not applicable
Author

Thanks a lot julian for the reply .....