PATHITEMREVERSE DAX Function (Parent-child)
Returns the nth item in the delimited list produced by the Path function, counting backwards from the last item in the path.
Syntax
Parameter | Attributes | Description |
---|---|---|
Path |
A string which contains a delimited list of IDs. |
|
Position |
An integer denoting the position from the right end of the path. |
|
Type | Optional |
Optional. If missing or 0 then this function returns a string. If 1 then this function returns an integer. |
Return values
The n-position ascendant in the given path, counting from current to the oldest.
Remarks
- This function can be used to get an individual item from a hierarchy resulting from a PATH function.
- This function reverses the standard order of the hierarchy, so that closest items are listed first, For example, if the PATh function returns a list of managers above an employee in a hierarchy, the PATHITEMREVERSE function returns the employee’s immediate manager in position 2 because position 1 contains the employee’s id.
- If the number specified for position is less than one (1) or greater than the number of elements in path, the PATHITEM function returns BLANK.
- If type is not a valid enumeration element an error is returned.
Related functions
Other related functions are:
Last update: Jan 11, 2021 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
MSDN documentation: https://docs.microsoft.com/en-us/dax/pathitemreverse-function-dax