This reference lists 8 DAX parent-child & hierarchy functions, with frequently used functions marked 🔥. Each function includes syntax, an example and parameter notes.
| Function | Description | Syntax | Example |
|---|---|---|---|
ISANCESTOR |
Checks whether one value is an ancestor of another | ISANCESTOR(<ancestor_value>, <member_value>) |
ISANCESTOR(Employee[ManagerID], Employee[EmployeeID]) |
ISDESCENDANT |
Checks whether one value is a descendant of another | ISDESCENDANT(<descendant_value>, <ancestor_value>) |
ISDESCENDANT(Employee[EmployeeID], Employee[ManagerID]) |
ISSIBLING |
Checks whether two values are siblings | ISSIBLING(<member1>, <member2>) |
ISSIBLING(Employee[Employee1], Employee[Employee2]) |
PATH |
Returns a path rendered as text | PATH(<column1>, [<column2>]) |
PATH(Employee[EmployeeID], Employee[ManagerID]) |
PATHCONTAINS |
Checks whether the path contains the given text | PATHCONTAINS(<path>, <item>) |
PATHCONTAINS("/Managers/Employees/", "Employee") |
PATHITEM |
Returns the item at the given position in a path | PATHITEM(<path>, <position>, [<type>]) |
PATHITEM("/Managers/Employees/", 2) |
PATHITEMREVERSE |
Returns the item at the given position counting from the end of a path | PATHITEMREVERSE(<path>, <position>, [<type>]) |
PATHITEMREVERSE("/Managers/Employees/", 1) |
PATHLENGTH |
Returns the number of items in a path | PATHLENGTH(<path>) |
PATHLENGTH("/Managers/Employees/") |
From Online Toolbox (www.vba.net)