Zum Hauptinhalt springen

Table.FromPartitions

Gibt eine Tabelle zurück, die durch Kombinieren einer Gruppe partitionierter Tabellen entstanden ist.

Syntax​

Table.FromPartitions(
partitionColumn as text,
partitions as list,
optional partitionColumnType as type
) as table

Remarks​

Gibt eine Tabelle zurück, die das Ergebnis der Kombination eines Satzes partitionierter Tabellen partitions ist. partitionColumn ist der Name der Spalte, die hinzugefügt werden soll. Der Typ der Spalte ist standardmäßig any, kann jedoch von partitionColumnType angegeben werden.

Examples​

Example #1​

Suchen Sie einen Elementtyp in der Liste {number}.

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