BinaryFormat.Null
BinaryA binary format that reads zero bytes and returns null.
Syntax
BinaryFormat.Null(binary as binary) as anyParameters
| Name | Type | Required | Description |
|---|---|---|---|
binary | binary | Yes | The binary data (no bytes are consumed). |
Return Value
function — A binary format function that reads zero bytes and returns null.
Remarks
BinaryFormat.Null is a binary format specifier that reads zero bytes from the binary stream and returns null. It does not advance the read position.
This is useful as a placeholder in composite binary formats like BinaryFormat.Record or BinaryFormat.Choice where a field needs to exist in the result but does not correspond to any actual data in the binary stream. It can also be used in BinaryFormat.Group to skip or ignore certain tagged items.
Examples
Example 1: Use BinaryFormat.Null in a record
let
binaryData = #binary({0x01, 0x02}),
format = BinaryFormat.Record([
First = BinaryFormat.Byte,
Padding = BinaryFormat.Null,
Second = BinaryFormat.Byte
])
in
format(binaryData)Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks