Is there a path function in m code??

jilbobagins

Member
Joined
Apr 11, 2019
Messages
80
Reaction score
0
Points
6
Excel Version(s)
2016
Hi All,

Spotted a rather useful function (Link below) anyone know if there's and equivalent in M Code? I've tried and it doesn't seem to work?!



"Returns a delimited text string with the identifiers of all the parents of the current identifier, starting with the oldest and continuing until current"
https://docs.microsoft.com/en-us/dax/path-function-dax


Many Thanks in Advance!
 
Although useful ( I’ve saved that link!) it’s not what I was after. The PATH function creates a column that establishes the child/parent relationship.
 
Hi,
Exactly what the Path Function achieves in DAX.
 
Try this:

Code:
(Text as text, optional Delimiter as text) =>
let
    Del = if Delimiter = null then "\" else Delimiter,
    Split = Text.Split(Text, Del)
in
    Split

If you have the path as text in a column, then use: "Invoke custom function" and input the text string representing the data to split and the delimiter.
The resulting new column will contain a list which represents the split up path.
 
Back
Top