7. Data Cleaning A–Z in Power Query
7.21 Append Queries (Stack Rows)
Append stacks tables on top of each other, like SQL UNION ALL. Columns are matched by name.
Before – two tables
| Order ID | Amount | Platform |
|---|---|---|
| BLK-10001 | 320 | Blinkit |
| BLK-10002 | 85 | Blinkit |
| Order_No | Order_Value |
|---|---|
| AMZ-90001 | 410 |
After – Orders
| Order ID | Amount | Platform |
|---|---|---|
| BLK-10001 | 320 | Blinkit |
| BLK-10002 | 85 | Blinkit |
| AMZ-90001 | 410 | Amazon Now |
Steps in Power BI
- In AmazonNow_Orders, rename
Order_No→Order IDandOrder_Value→Amount(double-click the header). - Add the missing Platform column: Add Column › Custom Column › name
Platform› formula"Amazon Now"(and"Blinkit"in the Blinkit query if needed). - Home › Append Queries › Append Queries as New › Two tables (or Three or more tables) › choose Blinkit_Orders and AmazonNow_Orders › OK.
- Rename the result Orders. Right-click both source queries › untick Enable load.
Orders = Table.Combine({Blinkit_Orders, AmazonNow_Orders})
Ravindra Bagale's Tip
Mitrano, dhyan dya: appending before renaming hi classic chuk aahe: "Order_No" and "Order ID" become two half-empty columns, karan append matches columns by name. Make column names and types identical in every table before you append, then check that no column is mostly null. Ekdum simple aahe, fakt savay lavun ghya.
Practice task
Append the Blinkit and Amazon Now DarkStore lists into one table. Add a Platform column first, then remove duplicates by Store ID.