Table.Transpose
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
Returns a table with columns converted to rows and rows converted to columns from the input table.
Table.Transpose(table as table, optional columns as any) as table
| Argument | Description |
|---|---|
| table | The Table to modify. |
| optional columns | Columns to transform. |
Table.PromoteHeaders(
Table.Transpose(
Table.DemoteHeaders(
Table.FromRecords({
[Name = "Full Name", Value = "Fred"],
[Name = "Age", Value = 42],
[Name = "Country", Value = "UK"]
})
)
)
)
| Name | FullName | Age | Country |
|---|---|---|---|
| Value | Fred | 42 | UK |
Show: