OpenBI Docs Buy

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
ParameterTypeDescription
valueanyThe 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)
[]

Value.RemoveMetadata, Value.Type.

Last updated · OpenBI Studio 0.3.79