Table.PrefixColumns is a Power Query M function that prefixes all column names in a table with a given text followed by a period. The function returns a new table with the updated column names.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Table.PrefixColumns(
table as table,
prefix as text,
) as table
Description
Table.PrefixColumns returns a table with all column names in the table prefixed with the given text, prefix, followed by a period.
Examples
Prefix the columns with “MyTable” in the table.
// Output: Table.FromRecords( {[MyTable.CustomerID = 1, MyTable.Name = "Bob", MyTable.Phone = "123-4567"]} )
Table.PrefixColumns(
Table.FromRecords( {[CustomerID = 1, Name = "Bob", Phone = "123-4567"]} ),
"MyTable"
)
Related functions
Other functions related to Table.PrefixColumns are:
- Table.CombineColumns
- Table.CombineColumnsToRecord
- Table.SplitColumn
- Table.TransformColumnTypes
- Table.TransformColumns
- Table.TransformRows
2023-2026 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy