OpenBI Docs Buy

Table.PrefixColumns

Puts a prefix and a dot in front of every column name.

Group: Table. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Table.PrefixColumns(table as table, prefix as text) as table
ParameterTypeDescription
tabletableThe table whose columns get the prefix.
prefixtextThe text to put in front; a dot comes between it and each name.

Returns

table. The same rows, each column renamed prefix.name.

Remarks

  • Handy before two tables with the same column names (Id, Name) are combined side by side.

Examples

Product columns, marked as such

Table.PrefixColumns(#table({"Id", "Name"}, {{1, "Chair"}, {2, "Desk"}}), "Product")
Product.IdProduct.Name
1Chair
2Desk

Table.TransformColumnNames, Table.RenameColumns, Table.ExpandTableColumn.

Last updated · OpenBI Studio 0.3.79