共用方式為


Table.Transpose

語法

Table.Transpose(table as table, optional columns as any) as table

關於

將資料行轉成資料列,並將資料列轉成資料行。

範例 1

將名稱值組資料表的資料列轉成資料行。

使用方式

Table.Transpose(
    Table.FromRecords({
        [Name = "Full Name", Value = "Fred"],
        [Name = "Age", Value = 42],
        [Name = "Country", Value = "UK"]
    })
)

輸出

Table.FromRecords({
    [Column1 = "Full Name", Column2 = "Age", Column3 = "Country"],
    [Column1 = "Fred", Column2 = 42, Column3 = "UK"]
})