Table.PartitionValues

Table

Returns a table describing the partition values for a partitioned data source.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Table.PartitionValues(table as table) as table

Parameters

NameTypeRequiredDescription
tabletableYesA table from a partitioned data source.

Return Value

tableA table where each row represents a partition with its key column values.

Remarks

Table.PartitionValues returns a table describing the available partitions of a partitioned data source. Each row in the result corresponds to one partition and contains the partition key column values. This function is specific to connectors that expose partition metadata — such as Azure Data Lake Storage, Microsoft Fabric Lakehouses, or certain OData sources — and is primarily used in advanced connector development and data exploration scenarios.

Unlike Table.Partition (which programmatically divides an arbitrary table into N hash-based buckets), Table.PartitionValues reads existing partition structure declared by the underlying data source. This distinction matters: Table.PartitionValues is a metadata query about the source, not a computation on in-memory data.

A common use case is to enumerate available partitions and then load each one selectively rather than pulling all data at once. This can reduce data transfer when only specific partition ranges are needed (e.g., only year 2024 partitions from a multi-year lake table).

Examples

Example 1: List partition values from an Azure Data Lake table

let
    Source           = AzureStorage.DataLake("https://myaccount.dfs.core.windows.net"),
    PartitionedTable = Source{[Name = "sales"]}[Data],
    Partitions       = Table.PartitionValues(PartitionedTable)
in
    Partitions
Applied Steps

The final output — calls Table.PartitionValues to retrieve the partition key metadata, returning one row per available partition with Year and Month columns.

Year
Month
1202401
2202402
3202403
4202404

Example 2: Inspect partition metadata from a Fabric Lakehouse

let
    Source     = Lakehouse.Contents(null){[workspaceId = "my-workspace-id", lakehouseId = "my-lakehouse-id"]}[Data],
    SalesTable = Source{[Id = "sales", ItemKind = "Table"]}[Data],
    Partitions = Table.PartitionValues(SalesTable)
in
    Partitions
Applied Steps

The final output — calls Table.PartitionValues to retrieve partition metadata, returning one row per year partition available in the Lakehouse table.

Year
12022
22023
32024

Example 3: Filter to load only recent partitions

let
    Source           = AzureStorage.DataLake("https://myaccount.dfs.core.windows.net"),
    PartitionedTable = Source{[Name = "sales"]}[Data],
    Partitions       = Table.PartitionValues(PartitionedTable),
    RecentPartitions = Table.SelectRows(Partitions, each [Year] = "2024"),
    Data             = Table.Combine(
                           List.Transform(
                               Table.ToRows(RecentPartitions),
                               each PartitionedTable{[Year = _{0}, Month = _{1}]}[Data]
                           )
                       )
in
    Data
Applied Steps

The final output — loads and combines only the 2024 partitions from the data lake, reducing data transfer compared to loading all years.

Note
1Returns all rows from 2024 partitions only, reducing data transfer from the lake.

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks
Contributors
kyleamueller