Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

2.5 Merging and Appending Queries

Lesson 15 of 62 in the free Power BI notes on Siksha Sarovar, written by Rohit Jangra.

Merging and Appending Queries

Combining data from multiple tables is one of the most powerful features of Power Query. There are two main operations: Merge (join horizontally) and Append (stack vertically).

Merge Queries (Horizontal Join)

Merging combines columns from two tables based on a matching column — similar to SQL JOINs.

Steps:

  1. In Power Query, click HomeMerge Queries
  2. Select the primary table (the one you're adding columns to)
  3. Select the secondary table (the one with additional columns)
  4. Click the matching column(s) in both tables
  5. Choose the Join Kind
  6. Click OK
  7. Expand the merged column to select which columns to add

Join Types

Join KindDescriptionResult
Left OuterAll rows from left table + matching rows from rightKeeps all left rows
Right OuterAll rows from right table + matching rows from leftKeeps all right rows
Full OuterAll rows from both tablesKeeps everything
InnerOnly matching rows from both tablesSmallest result
Left AntiRows from left table that have NO match in rightShows missing data
Right AntiRows from right table that have NO match in leftShows missing data

Merge Example

Table A (Orders): OrderID, CustomerID, Amount Table B (Customers): CustomerID, CustomerName, City

Merge on CustomerID using Left Outer Join → Result includes all orders with customer names and cities.

Append Queries (Vertical Stack)

Appending stacks rows from two or more tables on top of each other — like SQL UNION.

Pre-requisite: Tables must have the same column structure (same number and names of columns).

Steps:

  1. In Power Query, click HomeAppend Queries
  2. Choose:
  • Two Tables: Append one table to the current query
  • Three or More Tables: Select multiple tables to append
  1. Click OK

Append Example

Q1 Sales: Date, Product, Revenue (Jan-Mar data) Q2 Sales: Date, Product, Revenue (Apr-Jun data)

Append → Result: A single table with all 6 months of data.

Merge vs Append

FeatureMergeAppend
DirectionHorizontal (adds columns)Vertical (adds rows)
SQL EquivalentJOINUNION
RequirementMatching key columnSame column structure
Use CaseCombine related data from different tablesStack similar data from different periods