Skip to content

Power Query is the part of Power BI that runs before any DAX does: connecting to a source, fixing the column types, unpivoting the month columns, merging in the lookup table. Every click in the editor writes M code, and that code is what actually executes — on refresh, against the source, possibly on a schedule you are not watching.

The sensible reading order is the getting-started walkthrough, then the transformations you will use every week (group by, unpivot, merge, append, conditional columns), then the M language underneath. Query folding belongs early too, even for beginners: folding is the difference between a refresh that takes four seconds and one that takes forty minutes, and a single step in the wrong place can break it without any error message appearing.

What this section deliberately avoids is doing work in Power Query that belongs in the model, or vice versa. Cleaning that never changes should happen upstream and be forgotten; logic that changes with every report belongs in a measure. Most slow models we look at are a case of that boundary being crossed in both directions at once.