Underscore (_)
The implicit parameter created by each. In row functions it's the current row record; in Table.TransformColumns it's the current cell value.
What _ holds depends on the function that calls it: a row record in Table.SelectRows and Table.AddColumn, a single cell value in Table.TransformColumns, a list item in List.Transform, and a group's table in Table.Group aggregations. Reading the function's documentation tells you which.
In the Power Query editor
Generated steps like Table.TransformColumns(Source, {{"Name", Text.Trim}}) pass _ implicitly; custom code writes each Text.Trim(_).
Learn more
Practise it
- advanced~12 minPro
Write a shipping-cost function and apply it (kite shop)
Define a function that prices shipping from quantity and region, then add a Shipping column with it.
- intermediate~9 minPro
Write a tax function with an optional rate (shop)
Define Gross(net, optional rate) that uses 20% when no rate is given, and apply it to every order.
- advanced~12 minPro
Add a running total in date order (consultancy)
Sort claims by date, then add a Running Total of Amount from the first claim to each row.
- advanced~10 minPro
Trim every column except Amount with one generated step (members)
Text columns are padded with spaces, and new ones keep appearing. Build the Table.TransformColumns list from the column names.