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
Friends, pay attention: appending before renaming is a classic mistake: "Order_No" and "Order ID" become two half-empty columns, because 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. It's very simple – just make it a habit.
Ravindra Bagale's Tip – मराठी
मित्रांनो, लक्ष द्या: rename करण्याआधी append करणं ही classic चूक आहे: "Order_No" आणि "Order ID" दोन अर्धवट रिकामे columns बनतात, कारण append columns नावाने जुळवतो. Append करण्याआधी प्रत्येक table मध्ये column names आणि types एकसारखे करा, मग कोणताही column बहुतांश null नाही ना ते तपासा. एकदम simple आहे, फक्त सवय लावून घ्या.
Ravindra Bagale's Tip – हिंदी
दोस्तों, ध्यान दो: rename करने से पहले append करना classic गलती है: "Order_No" और "Order ID" दो आधे-खाली columns बन जाते हैं, क्योंकि append columns को नाम से मिलाता है. Append से पहले हर table में column names और types एक जैसे करो, फिर check करो कि कोई column ज़्यादातर null तो नहीं. बहुत आसान है, बस आदत बना लो.
Practice task
Append the Blinkit and Amazon Now DarkStore lists into one table. Add a Platform column first, then remove duplicates by Store ID.