Stop 04 · Power Query TransformationsTopics · 10/11

Append Queries

Part of the Power BI Roadmap

In short

North region sends one file, South sends another, with exactly the same columns. Append stacks them into one table so your report sees all of India at once.

Append Queries stacks tables with the same columns on top of each other, like combining sales from two regions into one table.

The jaadu balances a tall stack of shiny steel plates collected from several tables, adding one more plate on top.

Think of it like this

Stacking thalis

After lunch at a wedding, the steel thalis from every table are stacked into one tall pile at the washing area. Each thali has the same shape, so they stack neatly. Append stacks tables the same way, as long as their columns match.

Watch it happen

Three regions, one table

North
South
West
Append
Region column

1/5North file: 4,200 rows with OrderID, OrderDate, City and Amount.

The big ideas

What you need to know

Matches by column name

Append lines columns up by name, not position. Different names create extra columns full of nulls.

Append as New

Creates a fresh combined query and leaves the originals unchanged. Usually the cleaner choice.

Disable load on parts

Right-click the regional queries and untick Enable load, so only the combined table reaches the model.

Add a source label first

Add a Region column to each part before appending so you can still tell rows apart.

See it in code

Walk through the code

m
1let2    North = Table.AddColumn(SalesNorth, "Region", each "North", type text),3    South = Table.AddColumn(SalesSouth, "Region", each "South", type text),4    WestFixed = Table.RenameColumns(SalesWest, {{"amount", "Amount"}}),5    West = Table.AddColumn(WestFixed, "Region", each "West", type text),6    AllSales = Table.Combine({North, South, West})7in8    AllSales

1/3Add a Region column with a fixed value to each part.

Label each regional table, fix the one mismatched column name, then stack all three with Table.Combine.

Save yourself the pain

Common mistakes

Oops

Appending tables whose columns are named slightly differently.

Do this instead

Check and rename columns first. Mismatched names create half-empty duplicate columns.

Oops

Confusing Append with Merge.

Do this instead

Append adds rows (stacks tables). Merge adds columns (joins tables side by side).

Your mission

Combine regional sales

~20 min

Quick check

You append two tables and see Amount and amount as separate columns, each half full of nulls. Why?

Go deeper

  1. 1Append two yearly sales tables into one.
  2. 2Check what happens when column names differ slightly.
  3. 3Add a source column before appending so you know where each row came from.

More topics at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge