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"] )
Related articles
Learn more about Table.FromValue in the following articles:
- Create Tables from Scratch in Power Query M (40+ Examples)
Creating tables from scratch in Power Query can be tricky, but this post shows you how. You learn how to work with lists, records and much more! » Read more
Related functions
Other functions related to Table.FromValue are:
- Table.Combine
- Table.FromColumns
- Table.FromList
- Table.FromPartitions
- Table.FromRecords
- Table.FromRows
