Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

BITXOR function

Specialsts,

How can I use the the function BITXOR in a Qlikview load script?

BITXOR function

I would like the result to be the same as in EXCEL : BITXOR(number1, number2)

Is that possible?

Thanks,

Dennis.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I fixed it by creating a VB-function in the Module Editor.

And use that function in the script.


Thanks for your time.

Dennis.

View solution in original post

5 Replies
marcus_malinow
Partner - Specialist III
Partner - Specialist III

Hi Dennis,

bitxor (and other bitwise operators) are all in the documentation so I imagine it's as simple as

bitxor(number1, number2)

The script editor may indicate an error but the script should still load.

Marcus

Anonymous
Not applicable
Author

Thanks Marcus,

But I seems like it doesn't work.

It returns:


Error in expression:

BITXOR is not a valid function

Berekening:

LOAD *,

  bitxor(num, num2) as Bin_num

Anonymous
Not applicable
Author

I fixed it by creating a VB-function in the Module Editor.

And use that function in the script.


Thanks for your time.

Dennis.

MarcoWedel

Hi,

bitxor being an operator and not a function, another more straightforward approach could be:

QlikCommunity_Thread_147472_Pic1.JPG

LOAD *,

    OP1 bitxor OP2 as OP1xorOP2

Inline [

OP1, OP2

0, 1

0, 1

1, 0

1, 1

2, 0

2, 1

2, 2

255, 1

255, 2

255, 4

255, 8

255, 16

255, 32

255, 64

255, 128

];

hope this helps

regards

Marco

MarcoWedel

to improve readability:

QlikCommunity_Thread_147472_Pic2.JPG

QlikCommunity_Thread_147472_Pic3.JPG

hope this helps

regards

Marco