Table.FromPartitions
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
Returns a table that is the result of combining a set of partitioned tables into new columns. The type of the column can optionally be specified, the default is any.
Table.FromPartitions ( partitionColumn as text, partitions as list, optional partitionColumnType as nullable type) as table
| Argument | Description |
|---|---|
| partitionColumn | The name of the column where the values from the paritions will added. |
| partitions | The list of partitions to combine, specificed in {value, table} pairs. |
| Optional partitionColumnType | The type of the resulting column (default is any). |
Table.FromPartitions("Year",
{{1994, Table.FromPartitions("Month", {
{"Jan", Table.FromPartitions("Day", {
{1, #table({"Column1"},{{"Column1 Value 1"}})},
{2, #table({"Column1"},{{"Column1 Value 2"}})}})},
{"Feb", Table.FromPartitions("Day",
{{3, #table({"Column1"},{{"Column1 Value 3"}})},
{4, #table({"Column1"},{{"Column1 Value 4"}
})}})}})}})
equals
| Column1 | Day | Month | Year |
|---|---|---|---|
| Column1 Value 1 | 1 | Jan | 1994 |
| Column1 Value 2 | 2 | Jan | 1994 |
| Column1 Value 3 | 3 | Feb | 1994 |
| Column1 Value 4 | 4 | Feb | 1994 |
Show: