Value.Metadata
The metadata record attached to a value with meta.
Group: Values, types and errors. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Value.Metadata(value as any) as record
| Parameter | Type | Description |
|---|---|---|
value | any | The value to read the metadata of. |
Returns
record. The metadata record; an empty record when the value has none.
Remarks
- Metadata travels with a value without changing it:
42 meta [Unit = "kg"]is still 42 in arithmetic and comparisons.
Examples
A weight with its unit
Value.Metadata(42 meta [Unit = "kg"])
[Unit = "kg"]
One field of it
Value.Metadata(42 meta [Unit = "kg"])[Unit]
"kg"
A value without metadata
Value.Metadata(42)
[]