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
Result
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
Result
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
Result
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