PATHCONTAINS Function (DAX)

How does the PATHCONTAINS function (DAX) work?

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

PATHCONTAINS Formula Syntax

PATHCONTAINS(
     <path>, <item>
)

How do you use the PATHCONTAINS function?

This function checks to see if a folder contains a specified file (or folder).

Related Blog Posts

Related Support Forum Posts

Calculating dept head performance based on direct report performance
Calculating Employee Anniversaries
Dax Calculation question

Considerations when using the PATHCONTAIN function

If item is an integer number it is converted to text and then the function is evaluated. If conversion fails then the function returns an error.

This DAX function is not supported for use in DirectQuery mode.

Related Video Tutorials

Formula examples using the PATHCONTAINS function

=PATHCONTAINS(PATH(Employee[EmployeeKey], Employee[ParentEmployeeKey]), “23”)

pathcontains(“~/Dropbox”,”Photos”)

pathcontains(Table1[Who is above him];”Frank”)

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI

DOWNLOAD


Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.


Download DAX Formula Reference Guide