Power Query
M, folding, and transformations. 8 cards. Click a card to flip, or use the arrow keys and space bar.
What is query folding?
Power Query translating steps into a single native query the source executes, instead of transforming locally.
How do you check if folding is happening?
Right-click a step and look for View Native Query. Greyed out means folding stopped.
Name a common folding breaker.
Adding an index column; also some custom M functions and merges with non-foldable sources.
Unpivot — when do you use it?
To turn wide data (one column per month, say) into tall attribute/value rows the model can use.
Merge vs Append?
Merge is a join (adds columns); Append is a union (adds rows).
Is M case sensitive?
Yes. Table.SelectRows works; table.selectrows does not.
What does try ... otherwise do?
Catches a step error and substitutes a fallback value, preventing one bad row failing the refresh.
Where should you remove unused columns?
In Power Query, as early as possible, so they never enter the model.