Sub topic 1
Where Merge and Append Live in the Power Query Editor
This chapter shows where the merge and append commands sit in the Power Query Editor. It also shows how they appear as steps in a query. Later chapters cover what each operation does in detail.
Prerequisites
This chapter assumes you can do the following:
- Work with Excel tables and ranges.
- Load data into the Power Query Editor with Data > Get & Transform.
- Recognize column data types such as text, number, and date.
- Explain roughly what a lookup or join does.
The editor layout
Open the editor by selecting a table in Excel and choosing Data > From Table/Range. The window has four areas you will use throughout this tutorial.
| Area | What it shows |
|---|---|
| Ribbon | Commands grouped in tabs such as Home, Transform, and Add Column |
| Queries pane | Every query in the workbook, listed on the left |
| Data preview | The result of the currently selected step |
| Query Settings pane | The query name and the list of Applied Steps |
If the Queries pane is collapsed, select the small arrow at the left edge to expand it. If Query Settings is missing, turn it on under View > Query Settings.
Finding the commands
Both commands are on the Home tab, in the Combine group.
- Select the query you want to start from in the Queries pane. This is the primary query.
- Open the Home tab.
- In the Combine group, choose Merge Queries or Append Queries.
Each button has a drop-down with two choices:
- Merge Queries modifies the selected query by adding a merge step. Merge Queries as New leaves the selected query alone and creates a new query holding the result.
- Append Queries works the same way. Append Queries as New creates a new query.
The same commands also appear in the Excel window under Data > Get Data > Combine Queries.
What the commands add to a query
Choosing either command adds a step to the Applied Steps list. Applied Steps are the recorded actions that run in order each time the query refreshes. Select an earlier step to see the data as it was at that point.
- An append adds a step named Appended Query.
- A merge adds a step named Merged Queries.
The formula bar above the preview shows the M code for the selected step. If you cannot see it, turn on View > Formula Bar. A later chapter reads this code in detail. For now, notice that the step is a call to a function:
let
Source = Table.Combine({Sales_2023, Sales_2024})
in
SourceHere Table.Combine stacks two other queries. The names inside the braces are queries from the Queries pane.
Choose between modify and new
The choice between the plain command and the "as New" command affects your workflow.
- Use the plain command when the combined result is the final output of that query. The merge or append becomes one more step in its history.
- Use the "as New" command when you want to keep the source queries unchanged. This is common when the sources feed several different reports.
The "as New" result is a separate query that points to the originals. Changes to a source query flow into it on refresh.
Exercise
You select the query Orders and want a combined result without changing Orders. Which command do you choose, and where is it?
Show answer
Choose Merge Queries as New (or Append Queries as New, depending on the operation). Both are in the Combine group on the Home tab, in the drop-down on each button.