OpenBI Docs Buy

#binary

A binary value written out in a query, from a list of byte values.

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

Syntax

#binary(value as any) as any
ParameterTypeDescription
valueanyA list of numbers from 0 to 255, one per byte, or the bytes written as a Base64 text.

Returns

any. The bytes as a binary value.

Remarks

Compared with Power Query

Known difference in OpenBI Studio 0.3.79, found while this page was written and run on its engine:

  • (try #binary({256}))[HasError]: Power Query gives false: it reads the list only when the bytes are used, and the error comes then. OpenBI reads the list at once, so try catches the error here and gives true; the message is the same.

Examples

Four bytes

#binary({79, 115, 108, 111})
#binary({79, 115, 108, 111})

Bytes in hexadecimal, read as text

Text.FromBinary(#binary({0x4F, 0x73, 0x6C, 0x6F}))
"Oslo"

The same bytes from Base64

#binary("T3Nsbw==")
#binary({79, 115, 108, 111})

Binary.FromText, Text.ToBinary, Binary.Length.

Last updated · OpenBI Studio 0.3.79