Forum Discussion
Ned help with Path DAX
- 9 months ago
To check if a specific manager exists in an employee's PATH chain using DAX, use the PATHCONTAINS function. It returns TRUE if the manager's EmployeeID is anywhere in the PATH string.
Example measure or calculated column:
ManagerInPathFlag = IF ( PATHCONTAINS(EmployeeTable[Path], ManagerID), 1, 0 )EmployeeTable[Path] is the column created by the PATH function.
ManagerID is the specific manager's ID you want to check within the path.
This flags rows with 1 when the manager appears in the hierarchy chain and 0 otherwise.
To check if a specific manager exists in an employee's PATH chain using DAX, use the PATHCONTAINS function. It returns TRUE if the manager's EmployeeID is anywhere in the PATH string.
Example measure or calculated column:
EmployeeTable[Path] is the column created by the PATH function.
ManagerID is the specific manager's ID you want to check within the path.
This flags rows with 1 when the manager appears in the hierarchy chain and 0 otherwise.