Combine Data from Multiple Excel Files with Inconsistent Column Names

Поделиться
HTML-код
  • Опубликовано: 22 май 2024
  • Check out our newly launched M Language course ↗️ - goodly.co.in/learn-m-powerquery/
    In this video, we will learn how we can combine data from multiple excel files which contain different column names. We will also learn how to create a mapping table & plug that as the rename the inconsistent column names!
    ===== ONLINE COURSES =====
    ✔️ Mastering DAX in Power BI -
    goodly.co.in/learn-dax-powerbi/
    ✔️ Power Query Course-
    goodly.co.in/learn-power-query/
    ✔️ Master Excel Step by Step-
    goodly.co.in/learn-excel/
    ✔️ Business Intelligence Dashboards-
    goodly.co.in/learn-excel-dash...
    ===== LINKS 🔗 =====
    Blog 📰 - www.goodly.co.in/blog/
    Corporate Training 👨‍🏫 - www.goodly.co.in/training/
    Need my help on a Project 💻- www.goodly.co.in/consulting/
    Download File - goodly.co.in/combine-data-fro...
    ===== CONTACT 🌐 =====
    Twitter - / chandeep2786
    LinkedIn - / chandeepchhabra
    Email - goodly.wordpress@gmail.com
    ===== CHAPTERS =====
    0:00 Intro
    0:20 Explanation of the Problem & Data
    1:27 Understanding the Logic
    3:55 Getting all the Column Names
    8:01 Creating the Mapping Table in Excel
    9:28 Combining the Data & plugging in the Mapped Table
    15:47 Testing the Query
    17:41 My Courses
    ===== WHO AM I? =====
    A lot of people think that my name is Goodly, it's NOT ;)
    My name is Chandeep. Goodly is my full-time venture where I share what I learn about Excel and Power BI.
    Please browse around, you'd find a ton of interesting videos that I have created :) Cheers!
    - - - - -
    Music By: "After The Fall"
    Track Name: "Tears Of Gaia"
    Published by: Chill Out Records
    - Source: goo.gl/fh3rEJ​
    Official After The Fall RUclips Channel Below
    ruclips.net/channel/UCGQE...
    License: Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
    Full license here: creativecommons.org/licenses
  • НаукаНаука

Комментарии • 274

  • @attaturk87
    @attaturk87 Год назад +89

    I don't understand why this channel isn't bigger, seeing that the solutions he gives is by far explained in such a way that most people understand. Keep up the good work Sir.

    • @GoodlyChandeep
      @GoodlyChandeep  Год назад +1

      Glad you think so!

    • @rajendratiwari5321
      @rajendratiwari5321 Год назад

      Very true, I learnt about this channel few weeks back only. Great!!

    • @azizahmedkhan669
      @azizahmedkhan669 Год назад

      absolutely true, i too believe this.

    • @ankeshankesh
      @ankeshankesh Год назад

      I can't agree more!! Great work delivered seamlessly

    • @EciekPeciek
      @EciekPeciek Год назад +1

      I agree. Goodly is Godly in what is he doing. Helped me many, many times

  • @shyamadasgupta9423
    @shyamadasgupta9423 2 месяца назад +3

    I am sure this is helpful to the excel experts. As a layman, I wanted step by step solution. Like starting right with the mapping tables. Everything was already created earlier, so i could not understand anything.

  • @richardmartin7904
    @richardmartin7904 6 месяцев назад

    Wanted to let you know this proved useful to me. My case was far more complex and I had to debug somethings...but it worked! Saves me like 90 minutes of work.

  • @robkingston4518
    @robkingston4518 Месяц назад

    This rocks! Thank you for a great explanation on this topic!

  • @calpoltab4681
    @calpoltab4681 2 месяца назад

    wonderful really, I had a tough time playing around inconsistent columns. A big thankyou 🙂

  • @kuuuyajim
    @kuuuyajim 2 месяца назад

    Thank you for this tutorial...it's the perfect solution to the issue we are having with 100+ columns.

  • @katiegordham872
    @katiegordham872 Год назад

    This was an EXCELLENT tutorial, thank you so much.

  • @excelemployeeleavetracker1274
    @excelemployeeleavetracker1274 Год назад

    This was great as always. I have been doing this another way without Table.Combine and List function.I need to wrap my head around Table.Combine and List as this would make it more dynamic.

  • @jawadahmadehssan6251
    @jawadahmadehssan6251 Год назад

    Thank you Chandeep. This is a common challenge faced while working with different data sets.

  • @wayneedmondson1065
    @wayneedmondson1065 Год назад +1

    Another awesome lesson! Thanks for providing the sample files too. Thumbs up!!

  • @emilmubarakshin49
    @emilmubarakshin49 Год назад

    This is soo amazingly helpful! Thank you!

  • @maryjavasilyevna861
    @maryjavasilyevna861 11 месяцев назад

    Thank you so much! Easy and effective solution .

  • @emanuelecostantinocatanzar3042
    @emanuelecostantinocatanzar3042 Месяц назад

    This video is really GREAT. Thank you Chandeep for your outstanding way to explain the solutions.

  • @daveys
    @daveys Год назад

    Excellent video. I don’t think I could manage to replicate this but I found it a useful example of using PQ for wrangling data.

  • @mangixism
    @mangixism Год назад

    Hey Chandeep, thanks for the really good videos. It's really fun to listen to you and above all you explain everything really well. Keep up the good work!

  • @cjimmer4877
    @cjimmer4877 Год назад

    I will add this to my favorites. I have seen many techniques to combine inconsistent column names. I like this one. The list accumulate method I do not understand or at least can't remember each time I need it. But this method is memorable.

  • @user-ez5os8nm2z
    @user-ez5os8nm2z 2 месяца назад

    Excellent presentation. Thanks

  • @anilb5836
    @anilb5836 9 месяцев назад

    Thank you very much. I was working on such exercise since last 2 weeks and struggle a lot , referred many You tube videos but.... Hats up to you dear ...which helped to proceed further ..Very well explained ....

  • @jerrydellasala7643
    @jerrydellasala7643 Год назад

    Agree, Outstanding. NOTE: The Sales Data folder in the Zip file has two temporary files - names starting with ~ that are hidden and causing an error in the M Code. Just delete them to fix it. Also, change the folder path in the FolderLocation query, not the Data Source.

  • @rajugsg
    @rajugsg Год назад

    You are a MASTER of excel. Glad that I found your channel and is really informative/educational and highly useful.
    This channel deserves a millions of subscribers 🎉❤😊

  • @ahsaaah7247
    @ahsaaah7247 Год назад +1

    Hi, thank you for such a clear explanation. I hope you can help, not many people talk about this, but can we load each table as a separate data table? Or is it possible to horizontally combine all the tables if the date column is the same in all tables loaded here?

  • @sarikavaidya6681
    @sarikavaidya6681 2 месяца назад

    Your vedios r very very good I basic learner will watch all one by one

  • @sumardjo
    @sumardjo 3 дня назад

    thanks tutorial and simple file
    to step by step
    thank you very much

  • @eslamfahmy87
    @eslamfahmy87 7 месяцев назад

    Woow. You coverd every thing 😊 by easiest way

  • @the_creator99
    @the_creator99 10 месяцев назад

    Been looking for this recently!
    Saved my life! 🎉

  • @mumabird
    @mumabird 5 месяцев назад

    Omgggggggg you just saved my life. Thank you SO much ❤❤❤

  • @tuomiallen3427
    @tuomiallen3427 11 месяцев назад

    I'm going to try this in my next assignment! Thank you! For the potential risk of wrongly aligned mapping table after a new file with new headers getting added, I wonder if a better way of doing it is to create a mapping table to be left joined to the dynamic column header table? It will still shows empty if a new table with new header gets added, but at least it won't map to the wrong thing after refreshed.

  • @Bhavik_Khatri
    @Bhavik_Khatri Год назад

    Excellent video. Thank you m8.

  • @mrtfia
    @mrtfia Год назад +3

    Your videos are brilliant and you're so inspirational. You make it easy to understand the logic and then the code to apply the logic. This video has really helped me and I'd like to say a big THANK YOU !

  • @ubonguttah
    @ubonguttah Год назад

    Amazing Work.

  • @TheCraigie007
    @TheCraigie007 Год назад

    Loved it ! A very smart solution to a very common issue.

  • @chankokseng1030
    @chankokseng1030 5 месяцев назад

    i have watched alot videos and you are the best

  • @shobhavenkatesh20
    @shobhavenkatesh20 3 месяца назад

    Very well explianed.

  • @simonsales
    @simonsales Год назад

    Good lesson!

  • @seamushand8439
    @seamushand8439 Год назад

    Very impressive. YOu have an incredibly deep understanding of the data structure

  • @__HumanBeing
    @__HumanBeing Год назад

    Excellent video Chandeep! Thank you very much!

  • @umeshsawant2007
    @umeshsawant2007 6 месяцев назад

    This is really good .. got lot to learn

  • @user-ju1it8wf2j
    @user-ju1it8wf2j Год назад

    It is so clever to transpose and convert to list of lists! :)

  • @mukeshkadkol4759
    @mukeshkadkol4759 8 месяцев назад

    Superb ! Keep it up !

  • @davidmora668
    @davidmora668 9 месяцев назад

    Hi, thanks for your video, I was wondering if this method could be applied to combine csv files instead excel files.

  • @MunnaBhaiUSA
    @MunnaBhaiUSA 10 месяцев назад

    Life Saver Video!

  • @januszb4494
    @januszb4494 Год назад

    Thank you, I really needed this solution! :)

  • @sanjaykapadiya
    @sanjaykapadiya 18 дней назад

    amazing, thanks for detailed explanation, very easy to understand each step. Can you guide when new excel is added to source folder? How can those data automatically get loaded to Combined File?

  • @santoshpv321
    @santoshpv321 Год назад

    A godly solution to a problem i have been facing for so long....Super.

  • @anilkakade5793
    @anilkakade5793 Год назад

    Thanks a lot ! It’s very helpful ❤

  • @patrickkinbonso1809
    @patrickkinbonso1809 4 месяца назад

    I have applied the learning from this video to the task that I need completing and it works a treat, thank you Chandeep.
    One quick question. I have no problem doing this when I use Power Query in Excel. How do I do the same when I use Power Query from within Power BI please?
    Specifically, how do I load the "mapping" list from Power BI into Excel, so I can generate the "rename" column before loading the table back from Excel into Power BI to generate the "Renames" query?
    Thanks

  • @TheMoh148
    @TheMoh148 Год назад +1

    Many thanks Chandeep,
    For mapping list of lists:
    It will be better to use Table.ToRows only
    Instead of
    table.Transpose + Table.ToColumns
    Regards
    Mohammed from Algeria.

  • @Altaf_Alam
    @Altaf_Alam 9 дней назад +1

    Sir i have a question so kindly reply 😊
    1. How can we create connections only on multiple tables at once through power query?
    Plz reply sir 🙏

  • @happyheart9431
    @happyheart9431 2 месяца назад

    Million Thanks

  • @Will.Tru8
    @Will.Tru8 Год назад

    this is amazing.. Thank You!

  • @andrewmorris8531
    @andrewmorris8531 8 месяцев назад

    This video is super helpful as are all the videos. I've learned so much from this channel. Question I have, in this video you create a custom column to create a table so we can see all the sheets within a file. Is it possible to filter to a particular sheet at this step BEFORE expanding the custom column? I have multiple excel files and each has mutliple sheets. One sheet on each file is over 600,000 rows, and I'd like to avoid loading that sheet when i click expand.Is this possible to do?

  • @derekraghoonandan6750
    @derekraghoonandan6750 2 месяца назад

    excellently executed (MASTER)

  • @bodhanandannhattuvetty3179
    @bodhanandannhattuvetty3179 Год назад

    Very helpful video. Simple solution for a very common issue. Thank you very much for your effort to teach us.

  • @danieladoro
    @danieladoro Год назад

    Thank you so much, this was very helpful

  • @ksbring
    @ksbring Год назад

    wow, generating a list of all distinct column names for mapping is really genius. I also noticed that you faced the same problem of power query inserting rows in partial columns when query is refreshed which messes up the table. I got around this problem by using only VBA to refresh and disabling Explicit refresh. I don't think Microsoft is ever going to fix that.

  • @zoomingby
    @zoomingby 6 месяцев назад

    Hi there, thank you for this! What if the Excel sheets/files have different numbers of columns, which of course will have names not common to the other data sources/files?

  • @DK_85
    @DK_85 Год назад

    Thanks a lot! Very well understandable :)

  • @karimallahwala7022
    @karimallahwala7022 Год назад

    Very good content and very useful.Thank very much

  • @walkingonwter
    @walkingonwter Год назад +1

    Thank you for another great view. i am struggling to keep source file name in the final output. is that possible to do ...could you please help

  • @regihamp0206
    @regihamp0206 Год назад

    Wow that was hard work!! I used this on a folder full of csv files!! I followed you step by step and....it worked...OMG How do you know this stuff!! i would have never figured this out! thantks

    • @ighorfontaine5075
      @ighorfontaine5075 11 месяцев назад

      I have the same issue but doesn’t work because of the excel workbook function on csv files. Did you change the code? Thanks

  • @sherinthomas801
    @sherinthomas801 Год назад +1

    Another great video. We have all faced this issue sometime in our data combine journey. Thanks for laying it out so clearly. I would like to request you to create a video on setting up incremental refresh for files in sharepoint folder in Power BI. I have seen some solutions online but have never been able to get them to work. Thanks again!

  • @idaeinjaw2139
    @idaeinjaw2139 Год назад

    very useful thanks!

  • @ExcelWorkshop.
    @ExcelWorkshop. Год назад

    One of the best explanations

  • @AbhayGadiya
    @AbhayGadiya Год назад

    awesome, thanks for sharing

  • @janakchetri7731
    @janakchetri7731 15 дней назад

    This is great, what if I wanted to get the columns from two other sheet side by side to each other.
    Eg. Sheet 1: col1 | col2
    Sheet2: col3 | col4; Sheet3: col5 | col6
    I want the output to be
    col1 | col2 | col3 | col4 | col5 | col6
    In power query.. your inputs would be helpful. Looking to hear suggestions from others as well.

  • @domarregala5932
    @domarregala5932 Год назад

    one of the best tutorial keep on sharing

  • @daler.abdulloev
    @daler.abdulloev Год назад +1

    Great solution Chandeep 👌 Could you please show solution for xls (not xlsx) files ? Looking for ways to automated conversion to xlsx or way to combine and use xls :)

  • @tiwarirr
    @tiwarirr Год назад

    Simply Gold Content as always.

  • @abhijeetshetye3764
    @abhijeetshetye3764 Год назад

    Amazing and very useful video. Thnx sir

  • @AlvaroFreireAF1
    @AlvaroFreireAF1 Год назад

    Great video! You save my day with this awesome tutorial 😁😁

  • @lokesh221188
    @lokesh221188 Год назад

    Amazing 😍

  • @abdulwahidtamboli5801
    @abdulwahidtamboli5801 Год назад

    Thanks a lot, the video helped

  • @shyamgupta963
    @shyamgupta963 Год назад

    Really the videos that you post would be very helpful to those who works in the corporate world especially who into data and makes their job much easier. Thanks for your efforts and wish your dreams come true and achieve heights.

  • @Dipakbohora
    @Dipakbohora Год назад

    I am a very big fan of this channel. Your teaching skill very good that even newbies can easily understand. Thank you very much for this trick.

  • @ighorfontaine5075
    @ighorfontaine5075 11 месяцев назад

    Very good, it’s a tricky method! I try it with csv files and it failed because of the excel workbook function. I’ll look for on my own but maybe you’ve already solved this problem. Thanks

  • @suhaimiabdazais
    @suhaimiabdazais Год назад

    Really well explanation.. Just subscribed...

  • @FRANKWHITE1996
    @FRANKWHITE1996 Год назад

    Thanks for sharing ❤

  • @Urgosandspirit
    @Urgosandspirit Год назад +6

    Good solution, I like it
    What I can point out as improvement is the stability issue that you pointed out at 16:47
    Indeed, you need to redo all of that because the table will store records which are not absolute, but some kind of position oriented based on content of the query behind it. I would say this is generally not a good practice to combine query generated table and manual input. Imagine you have multiple tables like that - it is extremely hard to control and spot the difference between them as at least they would be of the same color.
    My solution to such stability issues:
    1. load the query table, but remain it intact - do not add anything to it manually
    2. create another table manually and use different color theme (blue for example) so it is different from the query format
    3. name this table and its columns absolutely same way and copy the query table content to your manual table - at this point you will have two tables which will be identical for its content
    4. create data validation in manual table columns referring to the query table columns as a dynamic range using =INDIRECT("Table1[Column1]") string - you need to do it column by column
    5. extend the manual table with new columns that you need - "rename" column in your example
    6. add the controls through LEFT and RIGHT OUTER joins between the original query table and manual blue table to check the consistency - i.e., that you did not forget to include all of the entries to your manual table. Outcome of joins can be count or non-blank count that produces outcome of a check table with a single cell
    7. merge the manual table with other query tables inside the query editor to achieve your goal
    Yes, it is much more than shown but it gives your control and automated ways to check the correctness of a process
    That's critical for a repeated exercise
    Thanks again!

    • @HachiAdachi
      @HachiAdachi Год назад +2

      Good solution! I was also going to suggest a use of a manual table but didn't think of the data validation idea. Perhaps, your Step 6 can be an "exception" list which would display any items not present in the manual table so that it is clear what item(s) need to be added. Maybe with a dynamic array like this:
      =FILTER( OrigTbl[Column], ISERROR( XMATCH( OrigTbl[Column], ManualTbl[Column] ) ), "Mapping is complete" )

  • @cdey2010
    @cdey2010 8 месяцев назад

    wow, love it

  • @sankhlayashraj
    @sankhlayashraj 10 месяцев назад

    Thank you Chandeep for this lovely video. Is there a way you can share a link to the video (if you have made) where we do merge different tables from sharepoint with different headers.

  • @martyc5674
    @martyc5674 Год назад

    Brilliant stuff- the best M channel 👌

  • @tnssajivasudevan1601
    @tnssajivasudevan1601 Год назад

    Excellent. Very useful

  • @RamiAlhaddad
    @RamiAlhaddad Год назад

    Brilliant!!!

  • @Jobin.Thomas
    @Jobin.Thomas Год назад

    Sir, how to learn all these codes/ syntaxes, video and explanation is awesome.
    Could you please suggest book or any material for this ?

  • @SP_Investments
    @SP_Investments Год назад

    As usual great 👍

  • @ratiram9556
    @ratiram9556 Год назад

    Nice , I m being a regular viewer of your channel. keep the good work.

  • @jasonmxx
    @jasonmxx Год назад

    hello, I have excel files with secondary sheets containing notes (not needed in the actual data table). @ around 4:30, is there a way to exclude these sheets from the list?
    Also, would like to learn how to Add a column for each table indicating the source file, so i can put a slicer on the visualization.
    thank you so much!

  • @Anilkumarda4
    @Anilkumarda4 6 месяцев назад

    Thanks sir

  • @patrickkinbonso1809
    @patrickkinbonso1809 2 месяца назад

    Would this work when combining CSV with commas as delimiter please?

  • @Sumanth1601
    @Sumanth1601 Год назад

    Excellent content 😊

  • @vadnerepravin
    @vadnerepravin Год назад

    Thank you 💗

  • @davidjosevarelagarcia7011
    @davidjosevarelagarcia7011 Год назад

    Hi, Chandeep, great video, I have a database with several pdf files and each file is equivalent to a client with their monthly transactions, there are a total of 13 clients, when I import them to power querry, each file generates a different number of columns each month, each month has more or fewer columns and they don't have headers, I have to create them according to the information I need to extract, the information I need each month appears in different columns. All clients handle the same information, but in one month client 1 has 24 columns in its file, the following month 25, then 22, and the information I need changes my position in the same way and so on for the rest of the clients.some suggestion.

  • @Gonza2432
    @Gonza2432 Год назад

    Thanks bro. Good video.

  • @rajendrakumaroram9812
    @rajendrakumaroram9812 Год назад

    Really helpful❤️

  • @suryatripathi3246
    @suryatripathi3246 Год назад

    Sir, I posted this question previously too. How to deal with filter function applied cells to form a table and sorting values using Power query. Another question is about using using sort function alone for two adjacent columns with filter function applied cells...

  • @patrickkinbonso1809
    @patrickkinbonso1809 3 месяца назад

    Hey Chandeep, how do I use this approach if I am using Power Query within Power BI instead of within Excel please? Thanks

  • @KuldeepSingh-nq1vi
    @KuldeepSingh-nq1vi Год назад

    Very Nice Video Bro, Can you please make videos on functions..

  • @Lyriks_
    @Lyriks_ Год назад

    This guy is pure genius undiluted

  • @shyamgupta963
    @shyamgupta963 Год назад

    Its Just Awesome…. Is it possible in Excel 2016 version??

  • @Milhouse77BS
    @Milhouse77BS Год назад

    Bravo!!