Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Regular Visitor

Power Query

Hi Expert


I am working in Power Query on Data ( more than 3 sheets). And I am using one file date as base file and want to bring column information from other sheets by using Unique Key. I have below challenges

1- in base file and other files, unique Key have duplicates key, his to fix it

2 - while using merge query, due to duplicates lines, lookup data total quantity is not correct, 

3- Hie to use Simif query to overcome total of qty from other sheets

Community Support
Community Support



It depends on how you want to deal with the data in other columns in the base table. If you don't care about data in other columns, you can select Unique Key column and use Remove Rows > Remove Duplicates to remove duplicated values so it will be unique. 



If you want to aggregate data in other columns, you can try the Group By feature. Group by Unique Key column and get aggregated values of other columns. Then data in Unique Key column will be unique. Group By can also help do some sumif operations.


Once Unique Key column only has unique values, you can merge queries then. 


Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Super User
Super User



Well, if your Unique ID isn't actually unique then the way to fix that would be to go to the system that creates these ID's and make them create unique ones.


If you try to bring the data into PQ and are getting issues due to duplicated 'Unique' ID's then I guess you could create your own Index column(s) which would be unique for each record, across all tables.  


Beyond that advice it's hard to say anymore without seeing your data.  Can you please suply some samples.


How do you intend to merge queries?  What fileds are to be merged/kept?  Are you actually merging files or appending them?


Please supply an example of what you want as a result of all of this.





Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.

Blog :: YouTube Channel :: Connect on Linkedin

Proud to be a Super User!

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors