BinaryFormat.UnsignedInteger64

Binary

A binary format that reads a 64-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.UnsignedInteger64(binary as binary) as any

Parameters

NameTypeRequiredDescription
binarybinaryYesThe binary data to read the 64-bit unsigned integer from.

Return Value

functionA binary format function that reads an 8-byte unsigned integer from binary data.

Remarks

BinaryFormat.UnsignedInteger64 is a binary format specifier that reads a 64-bit (8-byte) unsigned integer from binary data. The value range is 0 to 18,446,744,073,709,551,615 (UInt64 / ulong).

The default byte order is little-endian (least significant byte first). Use BinaryFormat.ByteOrder to wrap this format if the source data uses big-endian byte ordering.

This format is used for very large unsigned values such as file sizes, large counters, unique identifiers, and addresses in binary protocols and file formats.

Examples

Example 1: Read a 64-bit unsigned integer

let
    binaryData = #binary({
        0x01, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00
    }),
    result = BinaryFormat.UnsignedInteger64(binaryData)
in
    result

Example 2: Read a larger 64-bit unsigned integer

let
    binaryData = #binary({
        0x00, 0x00, 0x00, 0x00,
        0x01, 0x00, 0x00, 0x00
    }),
    result = BinaryFormat.UnsignedInteger64(binaryData)
in
    result

Compatibility

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