PARTITIONBY DAX Function (Filter)
The columns used to determine how to partition the data. Can only be used within a Window function.
Syntax
Parameter | Attributes | Description |
---|---|---|
PartitionBy_ColumnName | Optional Repeatable |
The name of an existing column to be used to partition the window function’s Relation. |
Return values
This function does not return a value.
Remarks
This function can only be used within a window function expression (INDEX, OFFSET, WINDOW).
The arguments PartitionBy_ColumnName must be model columns with a valid data lineage. You cannot use columns computed in DAX expressions for PartitionBy_ColumnName.
Related articles
Learn more about PARTITIONBY in the following articles:
-
Introducing window functions in DAX
In December 2022, DAX was enriched with window functions: INDEX, OFFSET, and WINDOW. This article introduces the syntax and the basic functionalities of these new features. » Read more
-
Preparing a data model for Sankey Charts in Power BI
This article describes how to correctly shape a data model and prepare data to use a Sankey Chart as a funnel, considering events related to a customer (contact, trial, subscription, renewal, and others). » Read more
-
Introducing VISUAL SHAPE for visual calculations in Power BI
This article introduces the VISUAL SHAPE clause, which defines a hierarchical structure for a table used in visual calculations. » Read more
-
Understanding apply semantics for window functions in DAX
This article explains the unique behavior of apply semantics: a new way of computing table expressions when multiple rows are selected in DAX window functions. » Read more
-
SQLBI+ updates in May 2023
In 2023, we released the first draft of the Window functions in DAX whitepaper as part of SQLBI+. Since then, we have released a few updates and are now glad to announce the availability of the related 3-hour video course… » Read more
Related functions
Other related functions are:
Last update: Oct 3, 2024 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://learn.microsoft.com/en-us/dax/partitionby-function-dax