PowerBI追加两个查询时重复首个查询数据,求问题原因及解决方法
Hey there! Let's figure out why your append operation isn't behaving like a SQL UNION and get it sorted. Based on what you described, here are the most common culprits and fixes:
1. Mismatched Column Names or Data Types
Power BI's append relies on exact column name matches (including case sensitivity!) and compatible data types between your two queries. If Query1 has a column named CustomerID and Query2 uses customerid, or one column is text while the other is numeric, Power BI won't merge those columns. Instead, it'll add separate columns for mismatched names, leaving you with only Query1's data in the original columns—making it look like the first query is duplicated.
Fix:
- Open the Power Query Editor and check both Query1 and Query2.
- Rename columns to ensure they're identical (right-click a column → Rename).
- Verify data types match (look at the icon next to each column name; if they differ, right-click → Change Type to align them).
2. Incorrect Append Selection
It's easy to accidentally misselect which queries to append. If you only added Query1 to the append operation (instead of both Query1 and Query2), you'll end up with a copy of Query1 instead of a combined result.
Fix:
- Go back to the Home tab in Power Query Editor.
- Click Append Query → Append Query as New Query.
- Select the Append two or more tables option.
- Use the Add button to include both Query1 and Query2 in the list of tables to append, then click OK.
3. Query2 Has No Rows
If Query2 is returning zero rows (maybe due to a filter step that removed all data, or a connection issue), the append result will only show Query1's data—making it seem like a duplicate.
Fix:
- Open Query2 directly in Power Query Editor.
- Check the applied steps on the right-hand side to see if a filter, remove rows, or other transformation is wiping out your data.
- Run Query2 alone to confirm it returns the expected rows.
Once you fix these issues, your append should work just like a SQL UNION, combining rows from both queries without duplicating the first one.
内容的提问来源于stack exchange,提问作者Saghir A. Khatri

