OpenBI Docs Buy

Number.BitwiseXor

Combines two whole numbers bit by bit, keeping the bits set in one of them but not both.

Group: Number. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Number.BitwiseXor(number1 as nullable number, number2 as nullable number) as nullable number
ParameterTypeDescription
number1nullable numberA whole number.
number2nullable numberAnother whole number.

Returns

nullable number. The bits where the two numbers differ; null when either is null.

Examples

Where two flag sets differ

Number.BitwiseXor(12, 10)
6

12 is 1100 and 10 is 1010: they differ in the 4 and 2 bits.

Switch the express flag (2) off again

Number.BitwiseXor(7, 2)
5

Number.BitwiseAnd, Number.BitwiseOr.

Last updated · OpenBI Studio 0.3.79