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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
rohitk1609
Master
Master

What is the use of AutoID in autonumber - script function?

Hi techies,

Can you please help me to understand what is the use of AutoId argument in autonumber function with example ?

 

Thanks,

Rohit 

Labels (1)
1 Solution

Accepted Solutions
ChiragPradhan
Creator II
Creator II

What a great question !

To answer your question briefly, it resets the increment counter if you are using the AutoNumber function for multiple fields.

Sales:
LOAD AutoNumber(Region, 'Region') AS RegionID,*;
LOAD * INLINE
[ Region, Year, Month, Sales
North,	2014,	May,	245
North,	2014,	May,	347
North,	2014,	June,	127
South,	2014,	June,	645
South,	2013,	May, 367
South,	2013,	May,	221
];

Area:
LOAD AutoNumber(Area, 'Area') AS AreaID,*;
LOAD * INLINE
[ Area, PostCode
ABC,	P111PP
DEF,	P121PP
GHI,	P131PP
JKL,	P131PP
MNO,	P141PP
PQR,	P141PP
];

Product:
LOAD AutoNumber(Product, 'Product') AS ProductID,*;
LOAD * INLINE
[ Product, Category
P1,	Toys
P2,	Toys
P3,	Toys
P4,	Toys
P5,	Toys
P6,	Toys
];

AutoNumber with AutoIDAutoNumber with AutoIDAutoNumber without AutoIDAutoNumber without AutoID

Finally, I would recommend reading this brilliant post by @hic 

https://community.qlik.com/t5/Qlik-Design-Blog/Symbol-Tables-and-Bit-Stuffed-Pointers/ba-p/1475369

 

View solution in original post

2 Replies
JordyWegman
Partner - Master
Partner - Master

Hi Rohitk,

You can see here a good example from @swuehl : https://community.qlik.com/t5/QlikView-Scripting/AutoNumber-or-AutoID/td-p/75032

Jordy

Climber

Work smarter, not harder
ChiragPradhan
Creator II
Creator II

What a great question !

To answer your question briefly, it resets the increment counter if you are using the AutoNumber function for multiple fields.

Sales:
LOAD AutoNumber(Region, 'Region') AS RegionID,*;
LOAD * INLINE
[ Region, Year, Month, Sales
North,	2014,	May,	245
North,	2014,	May,	347
North,	2014,	June,	127
South,	2014,	June,	645
South,	2013,	May, 367
South,	2013,	May,	221
];

Area:
LOAD AutoNumber(Area, 'Area') AS AreaID,*;
LOAD * INLINE
[ Area, PostCode
ABC,	P111PP
DEF,	P121PP
GHI,	P131PP
JKL,	P131PP
MNO,	P141PP
PQR,	P141PP
];

Product:
LOAD AutoNumber(Product, 'Product') AS ProductID,*;
LOAD * INLINE
[ Product, Category
P1,	Toys
P2,	Toys
P3,	Toys
P4,	Toys
P5,	Toys
P6,	Toys
];

AutoNumber with AutoIDAutoNumber with AutoIDAutoNumber without AutoIDAutoNumber without AutoID

Finally, I would recommend reading this brilliant post by @hic 

https://community.qlik.com/t5/Qlik-Design-Blog/Symbol-Tables-and-Bit-Stuffed-Pointers/ba-p/1475369