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:

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:

PATH DAX Function in Power BI

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.