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 dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
the data is similar to the example below
Field1 Field2
A 123456
A 125467
B 123456
B 3214
the value in Field2 must only occur once in the table, and the record with Field1 = A must be kept. Must end up with:
Field1 Field2
A 123456
A 125467
B 3214
Solved! Go to Solution.
First step I'd do would be to make a column that highlights whether your Field2 is duplicated, this explains it better than I can:
https://www.excelguru.ca/blog/2015/12/09/identify-duplicates-using-power-query/
Once you've got that, you can concatenate it with Field1, and filter out anything that has a value B1, B2 etc
Found a solution:
Create table1 with Field2 values where Field1 = A
Create table2 with Field1 and Field2 values where Field1 = B
Create new table3 using merge and do right antijoin of table1 and table2, resulting in table3 having only table2 records where Field2 does not exist in table1
remove extra columns from table3
append table3 to table1
this seems to work, but it would be good to know if there is a more elegant method for more complex datasets
First step I'd do would be to make a column that highlights whether your Field2 is duplicated, this explains it better than I can:
https://www.excelguru.ca/blog/2015/12/09/identify-duplicates-using-power-query/
Once you've got that, you can concatenate it with Field1, and filter out anything that has a value B1, B2 etc
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 |
---|---|
63 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
82 | |
62 | |
45 | |
41 | |
40 |