PATHCONTAINS DAX function in Power BI

The PATHCONTAINS DAX function returns TRUE if the specified item exists within the specified path.

Syntax PATHCONTAINS(path, item)

The function has the following parameters:

Return value: A value of TRUE if item exists in path; otherwise, FALSE.

Example: Let’s create a calculated column.

DAX

PATHCONTAINS Column = 
    PATHCONTAINS(
        Employees[HierarchyPath], 
        "4"
    )        

The output of the above DAX code is shown below:

PATHCONTAINS DAX function in Power BI