Table.ExpandListColumn
ไวยากรณ์
Table.ExpandListColumn(table as table, column as text) as table
เกี่ยวกับ
table
กําหนด ที่ column
ประกอบด้วยรายการค่า แยกรายการเป็นแถวสําหรับแต่ละค่า ค่าในคอลัมน์อื่น ๆ จะถูกทําซ้ําในแต่ละแถวใหม่ที่สร้างขึ้น ฟังก์ชันนี้ยังสามารถขยายตารางที่ซ้อนกัน โดยถือว่าเป็นรายการของเรกคอร์ด
ตัวอย่าง 1
แยกคอลัมน์รายการ [Name]
การใช้งาน
Table.ExpandListColumn(
Table.FromRecords({[Name = {"Bob", "Jim", "Paul"}, Discount = .15]}),
"Name"
)
เอาท์พุท
Table.FromRecords({
[Name = "Bob", Discount = 0.15],
[Name = "Jim", Discount = 0.15],
[Name = "Paul", Discount = 0.15]
})
ตัวอย่าง 2
แยกคอลัมน์ตารางที่ซ้อนกัน[คอมโพเนนต์]
การใช้งาน
Table.ExpandListColumn(
#table(
{"Part", "Components"},
{
{"Tool", #table({"Name", "Quantity"}, {{"Thingamajig", 2}, {"Widget", 3}})}
}
),
"Components"
)
เอาท์พุท
Table.FromRecords({
[Part = "Tool", Components = [Name = "Thingamajig", Quantity = 2]],
[Part = "Tool", Components = [Name = "Widget", Quantity = 3]]
})
คำติชม
https://aka.ms/ContentUserFeedback
เร็วๆ นี้: ตลอดปี 2024 เราจะขจัดปัญหา GitHub เพื่อเป็นกลไกคำติชมสำหรับเนื้อหา และแทนที่ด้วยระบบคำติชมใหม่ สำหรับข้อมูลเพิ่มเติม ให้ดู:ส่งและดูข้อคิดเห็นสำหรับ