Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tinkerz1
Creator II
Creator II

Can you find the max of autonumberhash128 and is the max of a complex key

Hi,

I have a concated string of over 14 digits, something like 1234&5678&9112&3456&7891

As it's over 14 digits I can't find the max number, is it possable the max of autonumberhash128 will provide the same information?

Thanks

6 Replies
sathishkumar_go
Partner - Specialist
Partner - Specialist

Did you concatenated with string or number?

Please explain briefly what do you want? and provide sample data.

-Sathish

tinkerz1
Creator II
Creator II
Author

I used Num#([Field1]&[Field2]&[Field3],0)

This concatenated a number longer the 14 digits, so I could no find the max.

I was looking for a method that would find the max number and thought autonumberhash128 would rank the number into a smaller set.

swuehl
MVP
MVP

Autonumber() or AutonumberHashXXX() would just create a sequential integer number based on the load order of the input values. There is no direct relation between the input value and the returned autonumber value. If load order changes, the returned value will change.

Maybe you can use

Evaluate ([Field1]&[Field2]&[Field3] ) AS NUMBER

Then find the max NUMBER value. Note that this will cast the number to a floating point, but depending on your requirements, you may still find the max number.

marcus_sommer

Another approach might be to sort these date/field (before hashing) like:

Sort:

Load rowno() as Nr, YourStringNumberField Resident xyz Order by YourStringNumberField;

Further possible could be to divide the single number-parts (or the complete number) with a high number like 1M (and maybe some rounding) and put these together again - it's quite ugly but it might work.

- Marcus

Peter_Cammaert
Partner - Champion III
Partner - Champion III

This looks a bit dumb, but it allows you to convert concatenated values with more than 14 digits into exponential notation in (almost) one stroke. On condition that you know the maximum length of each value:

((((1234*10000.0)+5678)*10000.0 + 9112)*10000.0 + 3456)

Note that you should consider anomalies resulting from concatenating small values. If four fields contain value 1, should the result be 1111 (simple concatenation will produce this value) or 1000100010001 ?