Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi techies,
Can you please help me to understand what is the use of AutoId argument in autonumber function with example ?
Thanks,
Rohit
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 AutoID
AutoNumber 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
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
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 AutoID
AutoNumber 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