PATHLENGTH is a DAX function that returns the number of items in a given path string.
Syntax
PATHLENGTH( Path )
Argument | Properties | Description |
---|---|---|
Path | A string which contains a delimited list of IDs. |
PATHLENGTH is a DAX function that returns the number of items in a given path string.
PATHLENGTH( Path )
Argument | Properties | Description |
---|---|---|
Path | A string which contains a delimited list of IDs. |
The number of items that are parents to the specified item in a given PATH result, including the specified item.
This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.
The following example takes an employee ID as input to a PATH function and returns a list of the managers above that employee in the hierarchy, The PATHLENGTH function takes that result and counts the different levels of employees and managers, including the employee you started with.
= PATHLENGTH(PATH(Employee[EmployeeKey], Employee[ParentEmployeeKey]))
Other functions related to PATHLENGTH are:
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy