Skip to content

How to add and view comments in M code in Power Query

If you are working with queries that include multiple steps you should always comment your code. And if your query is simple you should still add comments. Here’s couple of tips how to add comments to your M code and how you can easily view comments from query.

One line comments can be added by starting line with “//”. Multiline comments can be added by using “/” as a start mark and comment can be ended with “/”.

Comments regarding every step should be added before the step. On the next phase you understand why.

After you have added comments on Advanced editor you can view comments from Applied steps list. So there is no need to use Advanced editor for viewing comments in your code.

If step contains comment you can see info icon on the right side of the step and view comment by bringing your cursor on top of the icon.

Published inPower BIPower QueryUncategorized

Be First to Comment

Leave a Reply

Your email address will not be published.