Table.FromValue

Updated on

Table.FromValue is a Power Query M function that creates a table with a column containing the provided value or list of values. The function returns a table with a single column containing the input values.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Table.FromValue(
   value as any,
   optional options as nullable record,
) as table

Description

Table.FromValue creates a table with a column from the provided value(s). It forms a table with a column containing value or a list of values. Optional options can control column names and other settings: DefaultColumnName represents the name of the column used when creating a table from a list or scalar value.

Examples

Create a table from the value 1.

// Output: Table.FromRecords( {[Value = 1]} )
Table.FromValue( 1 )

Create a table from the list.

Table.FromValue( {1, "Bob", "123-4567"} )

Create a table from the value 1, with a custom column name.

// Output: Table.FromRecords( {[MyValue = 1]} )
Table.FromValue( 1, [DefaultColumnName = "MyValue"] )

Learn more about Table.FromValue in the following articles:

Other functions related to Table.FromValue are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/table-fromvalue