Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

help needed: perform bitand between two huge numbers


I have two (string) fields containing the binar representation of big numbers and I need to perform a bitwise AND between these fields.


F1 = '01001...001'

F2 = '00101...011'

the result should be a string obtained by processing AND for each pair of digits in same ordinal position.

Result = '00001...001'

The final gial is then to calculate a number by summing up each digit in the Result: = 0+0+0+1+...+0+0+1

Please keep in mind that the field values can have more than 10,000 digits.

Also the table containing these two fileds migth have more than 500,000 records (even 1,000,000)

The goal is to implement the solution (if any ) either during LOADING script or in CHARTs and the processing time not to be over 2-3 hours.

What I'm tring to do is to calculate the Similarity between Customers based on purchased Producs by them.

F1 and F2 represents the vectors for each Customer and its prurchased Products (0 = not purchased, 1 = purchased) and I try to compute the Similarities between each customer and the rest of the customers.

Any ideas, please?

(there is an sample attached with two field values. the digits are separated by ";", but it is not mandatory to be separated by anything)



1 Reply
MVP & Luminary
MVP & Luminary

Re: help needed: perform bitand between two huge numbers

If you have 500.000 records and you want to compare each record to every other record you will get around 125 billion results. You might want to rethink that idea.

Use a data mining tool if you want to do clustering analysis. If you want you can try to integrate R in Qlikview. You can find a book about data mining with R here.

talk is cheap, supply exceeds demand