PATH DAX function in Power BI
The PATH DAX function returns a delimited text string with the identifiers of all the parents of the current identifier, starting with the oldest and continuing until current.
DAX Syntax PATH(ID, ParentID)
The function has the following parameters:
- ID: The column that contains the unique identifier for the current row. This cannot be an expression. The data type of the value in ID_columnName must be text or integer and must also be the same data type as the column referenced in ParentID.
- ParentID: The column that contains the parent of the current row. This cannot be an expression. The data type of the value in parent_columnName must be text or integer, and must be the same data type as the value in the ID column.
Return value: A delimited text string containing the identifiers of all the parents to the current identifier.
Example: Let’s create a calculated column.
DAX
HierarchyPath = PATH( Employees[EmployeeID], Employees[ManagerID] )
The output of the above DAX code is shown below:

Note: If ParentID column value is BLANK, then PATH() returns the ID column value. In other words, if you look for the manager of an employee but the ParentID column has no data, the PATH function returns just the employee ID.