BinaryFormat.Byte

Binary

A binary format that reads an 8-bit unsigned integer.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

BinaryFormat.Byte(binary as binary) as any

Parameters

NameTypeRequiredDescription
binarybinaryYesThe binary data to read a single byte from.

Return Value

functionA binary format function that reads a single byte (8-bit unsigned integer) from binary data.

Remarks

BinaryFormat.Byte is a binary format specifier that reads a single byte (8-bit unsigned integer, range 0-255) from binary data. It is one of the most fundamental building blocks for parsing binary data in Power Query.

This format is commonly used as a component within BinaryFormat.Record, BinaryFormat.List, and BinaryFormat.Choice to read individual byte values from structured binary streams. It also serves as a length prefix reader when passed to functions like BinaryFormat.Binary, BinaryFormat.Text, or BinaryFormat.List.

Examples

Example 1: Read a single byte from binary data

let
    binaryData = #binary({42, 100, 200}),
    result = BinaryFormat.Byte(binaryData)
in
    result

Example 2: Read a list of bytes

let
    binaryData = #binary({10, 20, 30}),
    listFormat = BinaryFormat.List(BinaryFormat.Byte)
in
    listFormat(binaryData)

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks