• 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
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • 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
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Merge files and Replicate Multiple Records for Each Unique ID|Power Query|Excel Forum|My Online Training Hub

You are here: Home / Merge files and Replicate Multiple Records for Each Unique ID|Power Query|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
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 QueryMerge files and Replicate Multiple …
sp_PrintTopic sp_TopicIcon
Merge files and Replicate Multiple Records for Each Unique ID
Avatar
Sherry Fox
Poinciana, FL
Member
Members
Level 0
Forum Posts: 68
Member Since:
December 4, 2021
sp_UserOfflineSmall Offline
1
December 4, 2021 - 8:38 am
sp_Permalink sp_Print

I need to somehow create a new worksheet based on the two pieces of data I have.

My data_2396 sheet contains 31 records in my example  I need to have each of these 31 records displayed for each of the Document #s displayed on the DocID sheet, currently there are 14 in  my example.  So that would be a total of 31 x 14 records, or 434 records.  The document IDs are unique, however the 2396 records are not.  I have not been able to figure out how to get this data to merge based on these parameters.

 

Thanks,

Webbers

sp_AnswersTopicSeeAnswer See Answer
Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 870
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
2
December 4, 2021 - 8:27 pm
sp_Permalink sp_Print

Hello,

Something in line with this result perhaps?

In Power Query, add a custom column as a new step to your tbl_2396 query and add following formula:
= #"tbl_DocID"

This new step will have following code:
= Table.AddColumn(#"Changed Type", "Custom", each #"tbl_DocID")

Next step is to expand this new column, just ensure you have the Expand radio button ticked.

In attached file I had to load your tables as new queries in order to have something to play with.

Br,
Anders

sp_AnswersTopicAnswer
Answers Post
Avatar
Sherry Fox
Poinciana, FL
Member
Members
Level 0
Forum Posts: 68
Member Since:
December 4, 2021
sp_UserOfflineSmall Offline
3
December 7, 2021 - 1:34 am
sp_Permalink sp_Print

@Anders Sehlstedt,

Thank you so much!  I knew there had to be a way, but I simply could not figure it out.  I reviewed your example, and then applied the logic to a copy of m,y live data.  The live data shows 154712 rows, which is what I calculated it should based on the math ofd the # of documents times the # of records on my 2396 report.  Thanks again so very much!!!

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 870
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
4
December 7, 2021 - 7:01 am
sp_Permalink sp_Print

Hello Sherry,

I am glad I could be of help. Sometimes we tend to miss the simple solutions just because we think it must be more difficult than so.

/Anders

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Velouria, Dario Serrati, yonatan zelig, Christopher Anderson
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
yashal minahil
Oluwadamilola Ogun
Yannik H
dectator mang
Francis Drouillard
Orlando Inocente
Jovitha Clemence
Maloxat Axmatovna
Ricardo Freitas
Marko Meglic
Forum Stats:
Groups: 3
Forums: 24
Topics: 6200
Posts: 27182

 

Member Stats:
Guest Posters: 49
Members: 31861
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • 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
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

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.