Applied Steps "Comments"

Nick Burns

Member
Joined
May 24, 2017
Messages
162
Reaction score
0
Points
16
Excel Version(s)
Office 365
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?
 
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?
 
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)
 
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.
 
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. :)
 
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).
 
Back
Top