Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have two sets of data that is being imported in from two different sources. Dataset#1 contains the following columns (and additional columns not needed to match) : Brand, Vehicle, Type, Part. Dataset#2 contains the following columns: Brand, Vehicle, Type, Part, Level type, and status.
I would like to merge in the two columns to dataset #1 with the following conditions:
if dataset#1(Brand) = dataset#2(Brand) AND dataset#1(Vehicle) = dataset#2(Vehicle) AND dataset#1(Type) = dataset#2(Type) AND dataset#1(Part) = dataset#2(Part),
then duplicate the level type and status values. And if there are rows that exist in dataset#1 and not in dataset #2, then the values should equal 0 or null for those rows.
How can I achieve this in power query?
Thanks.
Solved! Go to Solution.
Hi, @Mary_789 ;
You could merge it by Multiple columns.
Expand it.
The final output is shown below:
Or can you share the example data and the result you want to output?
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Mary_789 ;
You could merge it by Multiple columns.
Expand it.
The final output is shown below:
Or can you share the example data and the result you want to output?
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Select dataset #1 then choose Merge Queries. Select the Brand Column then use ctrl-click to select the other needed columns. Choose dataset #2 and select the same columns in the same order and that will merge against all the columns
@johnt75 I have tried that and does not work since the level type column and status column do not exist in dataset#1. It requires the same amount of columns to merge two tables.
I am trying to create those columns in dataset#1 if all the other columns are equal.
Maybe I was thinking of Append Queries then. There's definitely a way to join 2 tables on common columns, and I'm sure its either Merge or Append
@johnt75 Yup I am able to join the tables by appending the data.
The problem is now that there are duplicate rows, one with status type and status column with values and another with status type and status column with null as the value.
I want to be able to combine those rows into one.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
70 | |
37 | |
29 | |
26 |
User | Count |
---|---|
91 | |
49 | |
45 | |
38 | |
36 |