Table.FromPartitions
Trả về một bảng là kết quả kết hợp một nhóm các bảng đã phân chia.
Syntax
Table.FromPartitions(
partitionColumn as text,
partitions as list,
optional partitionColumnType as type
) as table
Remarks
Trả về một bảng là kết quả của việc kết hợp một loạt bảng được phân vùng, partitions. partitionColumn là tên của cột cần thêm. Loại cột mặc định là bất kỳ nhưng có thể được chỉ định bởi partitionColumnType.
Examples
Example #1
Tìm loại mục từ danh sách <code>{number}</code>.
Table.FromPartitions(
"Year",
{
{
1994,
Table.FromPartitions(
"Month",
{
{
"Jan",
Table.FromPartitions(
"Day",
{
{1, #table({"Foo"}, {{"Bar"}})},
{2, #table({"Foo"}, {{"Bar"}})}
}
)
},
{
"Feb",
Table.FromPartitions(
"Day",
{
{3, #table({"Foo"}, {{"Bar"}})},
{4, #table({"Foo"}, {{"Bar"}})}
}
)
}
}
)
}
}
)
Result:
Table.FromRecords({
[
Foo = "Bar",
Day = 1,
Month = "Jan",
Year = 1994
],
[
Foo = "Bar",
Day = 2,
Month = "Jan",
Year = 1994
],
[
Foo = "Bar",
Day = 3,
Month = "Feb",
Year = 1994
],
[
Foo = "Bar",
Day = 4,
Month = "Feb",
Year = 1994
]
})
Category
Table.Row operations