BinaryFormat.ByteOrder is a Power Query M function that returns a binary format with the byte order specified by binaryFormat. The default byte order is ByteOrder.BigEndian.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
BinaryFormat.ByteOrder(
binaryFormat as function,
byteOrder as number,
) as function
Argument | Attribute | Description |
---|---|---|
binaryFormat | Takes a binaryformat function, whichas can be found at Binary Functions Overview. Examples are BinaryFormat.7BitEncodedSignedInteger, BinaryFormat.UnsignedInteger64, etc. | |
byteOrder | Specifies the sequence in which bytes are arranged, by using a ByteOrder.Type. By default, it is set to ByteOrder.BigEndian, where the most significant byte is placed first. Alternatively, ByteOrder.LittleEndian can be chosen, where the least significant byte is positioned first. |
Description
The BinaryFormat.ByteOrder function is used to define the byte order for a given binary format. This function takes two inputs: a binary format function and a byte order type. The byte order type specifies the sequence of byte arrangement.
When executed, BinaryFormat.ByteOrder returns a new binary format function that applies the specified byte order to the given binary format. This functionality is important for accurately interpreting binary data in different byte order conventions.
Examples
An example of how you can use BinaryFormat.ByteOrder is the following:
BinaryFormat.ByteOrder(
BinaryFormat.UnsignedInteger32,
ByteOrder.LittleEndian
)
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy