Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In a current table there is a field called [ReferencesQuestion] which is an integer field and can contain binary sequential values between 1 and 4096, there are other data associated with it. I have another table with a set of categories (A-P) which defines which questions are relevant to which categories but it does this through binary comparison also using integers. (e.g. Questions 1 and 4 are relevant to Category A, Questions 1,4 and 32 are relevant to Category B).
In SQL I can write a boolean query which Selects records if [ReferencesQuestion] & [CategoryInteger] = [ReferencesQuestion]. How do I do this in Qlikview?
Example Tables...
I'm not quite following the mapping you gave in your example. But QV does have a number of bit operators as well as a bitcount() function. See "Bit Operators" in the Help.
"bitand" is the equivalent operator to SQL &. So something like:
[ReferencesQuestion] bitand [CategoryInteger]
-Rob
I'm not quite following the mapping you gave in your example. But QV does have a number of bit operators as well as a bitcount() function. See "Bit Operators" in the Help.
"bitand" is the equivalent operator to SQL &. So something like:
[ReferencesQuestion] bitand [CategoryInteger]
-Rob
Hi Rob,
Thanks! bitand is exactly what I was looking for, I've implemented it in the code and it's perfect. I only get the list of questions relevant to a Category.
[ReferencesQuestion] bitand [CategoryInteger] = [CategoryInteger]
KP
Hi Kevin,
Please can you close this thread and mark Rob's post as correct answer. It will help other community users.
Thanks,
DV
www.QlikShare.com