แชร์ผ่าน


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"]
})