? Append & Merge Queries
✨ Quick Overview
Append and Merge are data-combining features in Power Query Editor. They allow you to unify fragmented datasets before loading them into your model.
? Key Concepts
- Append: Think "Stacking." Adding more rows to an existing table.
- Merge: Think "Joining." Adding more columns from a related table using a key.
- Both happen during the Transformation phase.
➕ Append Queries (Vertical)
Used when you have multiple files with the same columns but different data (e.g., Sales Jan, Sales Feb).
? Merge Queries (Horizontal)
Used when you need to bring in related info from another table (e.g., adding Customer Names to an Order table using CustomerID).
? Use Cases
- Append: Combining monthly CSV files into one master sales table.
- Merge: Connecting a Product ID in your sales data to a Product Category table.
- Data Enrichment: Merging external weather or holiday data with business metrics.
⚡ Combining Simulator
See how the table structure changes based on the operation:
Original Table (Sales)
| ID |
Amount |
| 101 |
$500 |
| 102 |
$750 |
✅ Tips & Best Practices
- Standardize Names: Columns must have identical names for a clean Append.
- Match Data Types: Ensure "ID" is text in both tables before merging to avoid errors.
- Merge as New: Always use the "As New" option to keep your source tables clean for debugging.
- The "Expand" Step: After merging, remember to click the ↔️ icon in the column header to choose which columns to keep.
? Try It Yourself
- Import two Sales CSVs and use Append Queries as New to stack them.
- Import a Customer table and Merge it with your Sales table using 'CustomerID'.
- Expand the merged column to show only 'Customer Name' and 'Location'.
- Check your Applied Steps to see the 'Source' and 'Expanded' steps.