Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic field in script load to count unique strings

Hi all,

I would like to create a field in my script load that counts unique vendor names. For instance, if I have 1000 line items in my source file divided between 3 vendors - Widgets Co, XYZ Supplier, and FakeVendor - I would like to give each of them a unique number (1,2,3):

Widgets Co. - 1

XYZ Supplier - 2

FakeVendor - 3

.

.

.

That way, as I add vendors to my source file, I can access them dynamically in the QV application by referencing the unique numbers in set analysis. How do I do this?

Thanks.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Paul

Sounds like you are after the autonumberhash128() function.

Try it in your load script as something like:

     autonumberhash128( [VendorField] ) as [Vendor Key]

Best Regards,     Bill

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Paul

Sounds like you are after the autonumberhash128() function.

Try it in your load script as something like:

     autonumberhash128( [VendorField] ) as [Vendor Key]

Best Regards,     Bill

Not applicable
Author

Wow, what an incredibly helpful function! I had no idea this was built-in. Out of curiosity, what does AutoNumberHash256() do?

Anonymous
Not applicable
Author

Paul

The Qlikview Desktop Help gives quite a good description of AutoNumberHash256().

Best Regards,     Bill