Results 1 to 6 of 6

Thread: Applied Steps "Comments"

  1. #1
    Acolyte Nick Burns's Avatar
    Join Date
    May 2017
    Posts
    75
    Articles
    0
    Excel Version
    Office 365

    Applied Steps "Comments"



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

    Is there a best practice or common method in showing a Comment Line in the applied steps?
    Something along seeing this in the Applied Steps
    Source
    ====Unstack Data===
    {steps to perform unstacking}
    ===Summarize Data===
    {steps to perform group/summarize}
    etc...

    I'm sure I can just create a step which automatically refers to the previous step and name it anything I want. The next step obviously just get the table from this new step (or I can edit it and make it point to the step before the "comment line")

    Thoughts?
    Oh... by the way, YOU'RE WELCOME!

  2. #2
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,679
    Articles
    0
    Excel Version
    O365
    Quote Originally Posted by Nick Burns View Post
    I'm sure I can just create a step which automatically refers to the previous step and name it anything I want. The next step obviously just get the table from this new step (or I can edit it and make it point to the step before the "comment line")
    I am afraid I don't understand those sentences, can you clarify?

  3. #3
    Acolyte Nick Burns's Avatar
    Join Date
    May 2017
    Posts
    75
    Articles
    0
    Excel Version
    Office 365
    Quote Originally Posted by Bob Phillips View Post
    I am afraid I don't understand those sentences, can you clarify?
    Sure

    On your applied steps, click on Source and select Insert Step After.
    This will create a step called Custom1 with = Source in the formula bar.
    Now you can just rename this step to anything you want such as ===Unstack Data===

    The step follows that step can do one of two things: either refer to that step or the one previous for example:
    = Table.TransformColumnTypes(#"===Unstack Data===", ...)
    or
    = Table.TransformColumnTypes(Source,...)


    In a sense I'm answering my own question. Just wondering does it really do any harm? Is it better for the next step to ignore the previous step and just use the step before the "comment" line? (second example)
    Oh... by the way, YOU'RE WELCOME!

  4. #4
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,679
    Articles
    0
    Excel Version
    O365
    I can't see that it makes any difference, although if the step after refers to Source, the step
    #"===Unstack Data===", will not get executed (M works that way).

    But why would you want to leave a step in that just refers to another? If you want to comment the code, go into the advanced editor and add a comment.

  5. #5
    Acolyte Nick Burns's Avatar
    Join Date
    May 2017
    Posts
    75
    Articles
    0
    Excel Version
    Office 365
    The problem with using the Advanced Editor is that you have to open a new window to see the comments.
    Putting them in the Applied Steps makes them readily accessible/viewable.

    Just my $0.02.
    Oh... by the way, YOU'RE WELCOME!

  6. #6
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,679
    Articles
    0
    Excel Version
    O365
    Yeah, but when you view the steps you only see one at a time, looking in the advanced editor means you see all of it. It doesn't stand in isolation. And you can see the steps and all of the code at the same time.

    In my view, the steps pane is not a code viewer, it is a way to manage the steps, rename them, re-order them, insert new steps (although I admit I never do it that way).

Tags for this Thread

Posting Permissions

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