SF logo
Power BI toolkit

Power Query Writer

Say what the query should do and get a Copilot prompt that writes it: working first time, easy to maintain and as short as possible, with one-word step names, short comments only where needed, and formatting in the style of powerqueryformatter.com. Common cleaning steps and the column types use reusable functions you add to your file once. Then paste Copilot’s reply here to check it before it goes into Power BI.

Step1

What should the query do?

In plain words: which rows to keep, which columns, what to add or combine, and anything to watch out for.

Step2

Where the data comes from

The more Copilot knows about the starting point, the less it guesses.

The columns at the start (strongly recommended)

In the Power Query preview, select the table icon at the top left of the grid, then Copy Entire Table, and paste the header and a few rows. Or type the names, one per line. Copilot then uses your exact column names, and the reply is checked against them.

Other queries, parameters and culture (optional)
Step3

Send the prompt to Copilot

Copy it into Copilot, or download it as a file and attach it. It asks for one reply in a set format the page can check.

Prompt for Copilot

      
Step4

Paste Copilot’s reply

The query is read and checked here: brackets and quotes, functions that don’t exist and argument counts, each with _ or [Column] in the right place, step references and order, column names, the type map, parameters, the naming rule and formatting.