The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
How is it possible for the excel to be not imported first, and, why is the merge option not possible?
Solved! Go to Solution.
Hi, @YoungLearning
Thank you very much for your reply. You are right. However, in Power Query, merge and append are two different operations. They give us different results. It is recommended that you read some excellent blogs and official documentation below to understand the differences between them:
Append vs. Merge in Power BI and Power Query - RADACAD
Merge queries overview - Power Query | Microsoft Learn
Append queries - Power Query | Microsoft Learn
In your reply, the append query is exactly what you were thinking.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @YoungLearning
You need to know the necessary steps in your exercise to achieve your goal form. Merge and append have different effects in Power Query:
A merge queries operation joins two existing tables together based on matching values from one or multiple columns:
The append operation creates a single table by adding the contents of one or more tables to another, and aggregates the column headers from the tables to create the schema for the new table:
In your exercise, you mentioned that you need to merge table2 into table1 to achieve the following effect:
So we should choose the append operation in Power Query. Take the following example data:
Append table2 to table1:
Since there are duplicate values, there are no duplicate values in the exercise, so we need to remove the duplicate values from table1 after the append operation:
The final result is as follows:
I've uploaded the PBIX file I used this time below.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I can see what you're doing there, but it doesn't explain why merge isn't accepted? Isn't it way easier and direct?
Hi, @YoungLearning
Thank you very much for your reply. In Power Query, the merge operation increments the columns in the table as follows:
The result of the merger:
This will have one more column for Table2, if we expand this column:
This does not meet your practice requirements. Your exercise requires merging the product columns from two tables into a new product column. Instead of adding a new column. The append operation is to merge the product column in table2 into the end of the product column in table1. Therefore, the append operation meets the requirements of the current problem.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That doesn't seem right, technically it would fall under 'Product' no? Shouldn't it follow the same column if the column headers are the same?
Hi, @YoungLearning
Thank you very much for your reply. You are right. However, in Power Query, merge and append are two different operations. They give us different results. It is recommended that you read some excellent blogs and official documentation below to understand the differences between them:
Append vs. Merge in Power BI and Power Query - RADACAD
Merge queries overview - Power Query | Microsoft Learn
Append queries - Power Query | Microsoft Learn
In your reply, the append query is exactly what you were thinking.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
From your infographics, the merge is merging where the fourth column in blue, adds on the green table where there are unique identifiers overlapping between the other three blue columns and the green columns.
The example given though, given they both only have one product column each, wouldn't they be able to merge and produce a single table with no duplicated values?
Who decides what's wrong or right? This practice resource makes it really difficult to learn it right!
User | Count |
---|---|
80 | |
73 | |
40 | |
30 | |
28 |
User | Count |
---|---|
107 | |
96 | |
55 | |
47 | |
47 |