Table.FromValue

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

Creates a table with a column containing the provided value or list of values, value. An optional record parameter, options, may be specified to control the following options:

  • DefaultColumnName : The column name used when constructing 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:

BI Gorilla Youtube Channel

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/table-fromvalue
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.