• 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

The data of the 2nd child for the 2ns set of data do not appear.|Power Query|Excel Forum|My Online Training Hub

You are here: Home / The data of the 2nd child for the 2ns set of data do not appear.|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 QueryThe data of the 2nd child for the 2…
sp_PrintTopic sp_TopicIcon
The data of the 2nd child for the 2ns set of data do not appear.
Avatar
Jim Chen
Member
Members

Power BI
Level 0
Forum Posts: 54
Member Since:
February 20, 2019
sp_UserOfflineSmall Offline
1
September 2, 2022 - 5:37 am
sp_Permalink sp_Print

I have two sets of data. Some of their column headers are the same while some of them are not. I apply either "Combine & Transform" or "Transform" to  a query, but the data for the 2nd set (CA-CF) do not appear even though they have the same column headers.

Please view the video below:

https://www.loom.com/share/ab0.....6794c04037

 

The first set of data: Columns T-X:

Last Name 2nd Child Grade 2nd Child Gender 2nd Child Start Date 2nd Child School Attended

 

The second set of data: Columns CA-CF

First Name Last Name 2nd Child Gender 2nd Child Grade 2nd Child email (Gmail only) 2nd Child School Attended
Rohan Vadlamani Male 6th   Windemere Ranch Middle School
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4449
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
September 2, 2022 - 9:10 am
sp_Permalink sp_Print

Hi Jim,

Because your dataset has duplicate column names, Power Query renames the duplicates 'First_Name_2', 'First_Name_3' and so on. It looks like the renaming of the duplicate columns do not match in Power Query and therefore aren't being matched when appending.

I recommend you rename the column names in your source files to make them unique and match as you'd expect.

Mynda

Avatar
Jim Chen
Member
Members

Power BI
Level 0
Forum Posts: 54
Member Since:
February 20, 2019
sp_UserOfflineSmall Offline
3
September 3, 2022 - 10:29 am
sp_Permalink sp_Print sp_EditHistory

Mynda,

I edit the column names for both sets of data so the column headers of the children's last names and first names are now unique, but the data of the 2nd child on the first set of data still don't appear:

1. Row three on the 2nd data set.

2. Row 53 after Power Query.

1st set of data: Columns S-X

First Name (2nd child) Last Name (2nd child) 2nd Child Grade 2nd Child Gender 2nd Child Start Date 2nd Child School Attended

 

2nd set of data: Columns CA-CF

First Name (2nd child) Last Name (2nd child) 2nd Child Gender 2nd Child Grade 2nd Child email (Gmail only) 2nd Child School Attended
Avatar
Jim Chen
Member
Members

Power BI
Level 0
Forum Posts: 54
Member Since:
February 20, 2019
sp_UserOfflineSmall Offline
4
September 3, 2022 - 11:30 am
sp_Permalink sp_Print sp_EditHistory

***I found that it works if I reverse the order of two data sets***

1. What does it mean to me? What is the best way to accomplish this task?

2. How can use Power Query to combine all column headers if some column headers from two data sets are different? I don't want to use "Append Tables".

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4449
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
5
September 3, 2022 - 2:09 pm
sp_Permalink sp_Print

Hi Jim,

File 2022-After_School_(in-person)2022-09-02_19_34_34.csv only has 37 columns. The second child names in 2022_Fall_Online_Classes2022-09-02_19_35_29.csv starts in column 79, but only 37 columns of the second file are being imported.

You can import these files as separate queries (get data > from csv file), then merge them using Full Outer join type which brings in all columns from both tables.

Or you can choose the 2022_Fall_Online_Classes2022-09-02_19_35_29.csv as your sample file.

Mynda

Avatar
Jim Chen
Member
Members

Power BI
Level 0
Forum Posts: 54
Member Since:
February 20, 2019
sp_UserOfflineSmall Offline
6
September 4, 2022 - 4:33 am
sp_Permalink sp_Print

Mynda,

I use Merge Query to merge two queries: Online & In-person. However, it doesn't work as expected. It creates additional columns to hold data from the 2nd Query instead of adding them up under the same column headers. I have made all column headers unique.

Submission Date First Name Last Name Cell Phone #1 Cell Phone #2 Email #1 Email #2 First Name (1st child) Last Name (1st child) 1st Child School Attended 1st Child Grade 1st Child Gender First Name (2nd child) Last Name (2nd child) 2nd Child Grade 2nd Child Gender 2nd Child School Attended First Name (3rd child) Last Name (3rd child) 3rd Child Grade 3rd Child Gender 3rd child Start Date 3rd Child School Attended
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4449
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
7
September 4, 2022 - 9:58 am
sp_Permalink sp_Print sp_EditHistory

My bad, I should have said Append, not Merge.  No need to get files from folder, just get each CSV file using Get Data > From Text/CSV. See attached - be sure to edit the source settings to point at the files on your PC.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Velouria, Nada Perovic, Denise Lloyd
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Raj Mattoo
Mark Luke
terimeri dooriyan
Jack Aston
AndyC
Denise Lloyd
michael serna
mashal sana
Tiffany Kang
Leah Gillmore
Forum Stats:
Groups: 3
Forums: 24
Topics: 6219
Posts: 27276

 

Member Stats:
Guest Posters: 49
Members: 31903
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.