• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Duplicate rows being created while merging queries|Power Query|Excel Forum|My Online Training Hub

You are here: Home / Duplicate rows being created while merging queries|Power Query|Excel Forum|My Online Training Hub

Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumPower QueryDuplicate rows being created while …
sp_PrintTopic sp_TopicIcon
Duplicate rows being created while merging queries
Avatar
F S

New Member
Members
Level 0
Forum Posts: 1
Member Since:
January 19, 2023
sp_UserOfflineSmall Offline
1
January 19, 2023 - 5:26 pm
sp_Permalink sp_Print

Hello all,

After I have merged queries, Power Query has created duplicate rows for which it found a N/A. How to resolve this without editing any of my other data sets? Everything else is working just fine. Only need a resolution for this. Thanks in advance.

Avatar
Riny van Eekelen
Örnsköldsvik, Sweden
Moderator
Members


Trusted Members

Moderators

Power BI
Level 0
Forum Posts: 382
Member Since:
January 31, 2022
sp_UserOnlineSmall Online
2
January 19, 2023 - 6:13 pm
sp_Permalink sp_Print

It would be helpful if you could upload a file containing some data and the queries you have merged.

Don't forget to press "Start upload" before you submit your reply.

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1800
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
3
January 19, 2023 - 9:21 pm
sp_Permalink sp_Print

Hi FS,
The second table should have a single record for the keys used for merging. If 2 or more rows from the second table are matching the merge criteria, when you expand the merged tables this action will copy the first table record for all the rows found in second table.

Avatar
Jerry Dellasala

Active Member
Members
Level 0
Forum Posts: 3
Member Since:
January 19, 2023
sp_UserOfflineSmall Offline
4
January 20, 2023 - 2:31 am
sp_Permalink sp_Print

You should be using "The second table" which you say "a single record for the keys used for merging" as your primary file (top file in the Merge dialog window. The default Merge is a "Left Outer Join (all from first, matching from second)".

If for some reason you can't use the second table as the first merge table, change the Merge Type to "Right Outer (all from second, matching from first)".

You can use multiple columns as keys like both First Name and Last Name, but be sure you select them in the same order. If you select more than one key field, the order# will appear above the column header.

The other possibility is you have inaccurate keys in one or both files where the keys are different but the data is the same. There's no easy fix for that though!

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 170
Currently Online: Riny van Eekelen, Ivan Kulubya, Christian Huapaya, Vijay Vardhan
Guest(s) 22
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1431
Anders Sehlstedt: 845
Velouria: 574
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 213
A.Maurizio: 202
Aye Mu: 201
Jessica Stewart: 185
Newest Members:
Vicky Otosnika
Abhishek Singh
Kevin Sojourner
Kara Weiss
And Woox
Armani Quenga
moshood bello
annelies b
James1989
lucy gilmour
Forum Stats:
Groups: 3
Forums: 24
Topics: 6045
Posts: 26523

 

Member Stats:
Guest Posters: 49
Members: 31492
Moderators: 2
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Riny van Eekelen
© Simple:Press —sp_Information
  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
 
  • About My Online Training Hub
  • Contact
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Copyright © 2023 · My Online Training Hub · All Rights Reserved

Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.

Download A Free Copy of 100 Excel Tips & Tricks

excel tips and tricks ebook

We respect your privacy. We won’t spam you.

x