From the course: Power BI Data Methods (2019)

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Consolidating M steps

Consolidating M steps

From the course: Power BI Data Methods (2019)

Start my 1-month free trial

Consolidating M steps

- In the US Census Power BI file, let's duplicate the query population by zip code, rename it with, "example two" at the end. We want to move this entire query into the folder for custom code examples. You right click on the query name, select "move to group" costume M code examples. Click on this code to select it. In the advanced editor window, we see the M code. Let's maximize the size of the screen on the top right. In our query the first term of each applied step expression references the previous step applied in the query editor. Think of it as taking the output of the last applied step and adding another transformation function to it for example. We can set up the steps in a single line of code if we would like by putting the steps inside of one another. This means we can consolidate the code by taking the expression from the previous step and placing it into the current applied step where we see that step…

Contents