Results 1 to 6 of 6

Thread: Is there a path function in m code??

  1. #1
    Seeker jilbobagins's Avatar
    Join Date
    Apr 2019
    Posts
    11
    Articles
    0
    Excel Version
    2016

    Wink Is there a path function in m code??



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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!

  2. #2
    Conjurer alansidman's Avatar
    Join Date
    Oct 2018
    Location
    Steamboat Springs
    Posts
    159
    Articles
    0
    Excel Version
    2019
    Look at this link on how to build a filepath function.

    https://www.excelguru.ca/blog/2015/0...n-power-query/

  3. #3
    Seeker jilbobagins's Avatar
    Join Date
    Apr 2019
    Posts
    11
    Articles
    0
    Excel Version
    2016
    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.

  4. #4
    Administrator AliGW's Avatar
    Join Date
    Nov 2015
    Location
    Ipswich, Suffolk, England
    Posts
    1,204
    Articles
    0
    Excel Version
    Office 365 Subscription
    Perhaps if you explain what you are trying to do ...
    Ali
    Enthusiastic self-taught user of MS Excel!

  5. #5
    Seeker jilbobagins's Avatar
    Join Date
    Apr 2019
    Posts
    11
    Articles
    0
    Excel Version
    2016
    Hi,
    Exactly what the Path Function achieves in DAX.

  6. #6
    Conjurer Rudi's Avatar
    Join Date
    Jan 2014
    Location
    Cape Town, RSA
    Posts
    134
    Articles
    0
    Excel Version
    Excel 365 ProPlus
    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.
    Regards,
    Rudi
    www.eileenslounge.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •