PATHITEMREVERSE DAX function in Power BI

The PATHITEMREVERSE DAX function returns the item at the specified position from a string resulting from evaluation of a PATH function. Positions are counted backwards from right to left.

Syntax PATHITEMREVERSE(path, position[, type])

The function has the following parameters:

Return value: The n-position ascendant in the given path, counting from current to the oldest.

Example: Let’s create a calculated column.

DAX

PATHITEMREVERSE Column = 
    PATHITEMREVERSE(
        Employees[HierarchyPath], 
        3, 
        INTEGER
    )    

The output of the above code is shown below:

PATHITEMREVERSE DAX Function in Power BI