Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Hi @HZAFAR
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.
Hi @HZAFAR
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.
regards
Phil
Proud to be a Super User!