Combine Data from Multiple Excel Files with Inconsistent Column Names

Поділитися
Вставка
  • Опубліковано 18 лис 2024

КОМЕНТАРІ • 307

  • @attaturk87
    @attaturk87 2 роки тому +99

    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  2 роки тому +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 8 місяців тому +8

    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.

  • @Urgosandspirit
    @Urgosandspirit 2 роки тому +7

    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 роки тому +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" )

  • @kuuuyajim
    @kuuuyajim 8 місяців тому

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

  • @anilb5836
    @anilb5836 Рік тому

    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 ....

  • @VirgilioAlbertoCardonaFajardo
    @VirgilioAlbertoCardonaFajardo 5 місяців тому

    You're a lifesaver, I'm just getting started into Query logic and your channel has been tremendously helpful!

  • @richardmartin7904
    @richardmartin7904 Рік тому

    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.

  • @jawadahmadehssan6251
    @jawadahmadehssan6251 2 роки тому

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

  • @calpoltab4681
    @calpoltab4681 7 місяців тому

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

  • @robkingston4518
    @robkingston4518 7 місяців тому

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

  • @patrickkinbonso1809
    @patrickkinbonso1809 10 місяців тому

    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

  • @franciscom.paredesarias2356
    @franciscom.paredesarias2356 2 роки тому

    Excellent solution to a recurring problem. Greetings from Chile

  • @rachelle5432
    @rachelle5432 4 місяці тому

    This really helps me out a lot honestly! I had been checking here and there but nowhere to be found the best way out of my problem till i checked this video out! Amazing❤❤❤

  • @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 Рік тому

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

  • @TheMoh148
    @TheMoh148 2 роки тому +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.

  • @meldeebueno
    @meldeebueno 3 місяці тому

    Your videos are immaculate. Thanks, Goodly.

  • @Dipakbohora
    @Dipakbohora 2 роки тому

    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.

  • @sarikavaidya6681
    @sarikavaidya6681 8 місяців тому

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

  • @jerrydellasala7643
    @jerrydellasala7643 2 роки тому

    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.

  • @emanuelecostantinocatanzar3042
    @emanuelecostantinocatanzar3042 7 місяців тому

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

  • @santoshpv321
    @santoshpv321 2 роки тому

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

  • @the_creator99
    @the_creator99 Рік тому

    Been looking for this recently!
    Saved my life! 🎉

  • @__HumanBeing
    @__HumanBeing 2 роки тому

    Excellent video Chandeep! Thank you very much!

  • @seamushand8439
    @seamushand8439 2 роки тому

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

  • @katiegordham872
    @katiegordham872 Рік тому

    This was an EXCELLENT tutorial, thank you so much.

  • @eslamfahmy87
    @eslamfahmy87 Рік тому

    Woow. You coverd every thing 😊 by easiest way

  • @nelsondantas7959
    @nelsondantas7959 4 місяці тому

    Amazing trick. Exactly what I was looking for. Thank you

  • @ighorfontaine5075
    @ighorfontaine5075 Рік тому

    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

  • @maryjavasilyevna861
    @maryjavasilyevna861 Рік тому

    Thank you so much! Easy and effective solution .

  • @bodhanandannhattuvetty3179
    @bodhanandannhattuvetty3179 Рік тому

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

  • @vipul4raf
    @vipul4raf 3 місяці тому

    Hi Chandeep Your videos are awsome. I have one question how can I add file name as a column in this example.

  • @weserickson3438
    @weserickson3438 2 місяці тому

    Thanks for the great video. It helped solve an challenge I have tried to solve for too long. What is the best way to solve if the table you are querying has headers on the 2 or 10th row vs the 1st row?

  • @TheCraigie007
    @TheCraigie007 2 роки тому

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

  • @davidmora668
    @davidmora668 Рік тому +1

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

  • @TechnicalReviewsbyEngineers
    @TechnicalReviewsbyEngineers 8 днів тому

    Hi awsome lessons, would you please advise if
    I have multiple nested tables and each table with 20 plus columns and I need to get only specific columns and also allign colunm names like you did in this video; how to achieve that

  • @ramandeepsr
    @ramandeepsr Рік тому

    This is super and is of big help!! Thank you!!
    Just wanted to know can we add the files names column at the end as sometimes we have to collate the data of different region, months, companies which will be very difficult to segregate without classifying.

    • @valdecirlima8099
      @valdecirlima8099 10 місяців тому

      im trying to do this rn, did you find how?

  • @sankhlayashraj
    @sankhlayashraj Рік тому

    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.

  • @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 🎉❤😊

  • @MaiMai01-w4k
    @MaiMai01-w4k 8 місяців тому

    Excellent presentation. Thanks

  • @excelemployeeleavetracker1274
    @excelemployeeleavetracker1274 2 роки тому

    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.

  • @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.

  • @tuomiallen3427
    @tuomiallen3427 Рік тому

    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.

  • @vijima1212
    @vijima1212 4 місяці тому

    Hi Chandeep, Thanks for the clear session, Can we use this file location & Mapping table as base data and refresh using other files from same location and removing the old files, Can it give the same output.

  • @sanjaykapadiya
    @sanjaykapadiya 6 місяців тому

    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?

    • @odallamico
      @odallamico 5 місяців тому

      Hi. If you are getting data from folder option in PQ, it is automatic

  • @cjimmer4877
    @cjimmer4877 2 роки тому

    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.

  • @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 ?

  • @emilmubarakshin49
    @emilmubarakshin49 Рік тому

    This is soo amazingly helpful! Thank you!

  • @mrtfia
    @mrtfia 2 роки тому +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 !

  • @thedebapriyakar
    @thedebapriyakar 16 днів тому

    Holy shit, this is the first video I have seen of yours. Absolutely insane work, man!

  • @mumabird
    @mumabird 11 місяців тому

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

  • @domarregala5932
    @domarregala5932 Рік тому

    one of the best tutorial keep on sharing

  • @netyoengratha
    @netyoengratha 3 місяці тому

    Thank Chandeep. It's very helpful :)

  • @ExcelWorkshop.
    @ExcelWorkshop. Рік тому

    One of the best explanations

  • @vamshimedishetty5624
    @vamshimedishetty5624 5 місяців тому

    Good video
    If header names of columns are in random order, does it reorder automatically?

  • @ratiram9556
    @ratiram9556 Рік тому

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

  • @Lyriks_
    @Lyriks_ Рік тому

    This guy is pure genius undiluted

  • @ahsaaah7247
    @ahsaaah7247 Рік тому +2

    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?

  • @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

  • @zoomingby
    @zoomingby Рік тому

    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?

  • @mirrrvelll5164
    @mirrrvelll5164 2 роки тому

    Well done as usually!!! Can we except M language course???

  • @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!

  • @shyamgupta963
    @shyamgupta963 Рік тому

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

  • @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...

  • @EthanEminence
    @EthanEminence 11 місяців тому

    i have watched alot videos and you are the best

  • @M4D5K1L2
    @M4D5K1L2 2 роки тому

    This guy blows my mind every time

  • @andrewmorris8531
    @andrewmorris8531 Рік тому

    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?

  • @martyc5674
    @martyc5674 2 роки тому

    Brilliant stuff- the best M channel 👌

  • @AlvaroFreireAF1
    @AlvaroFreireAF1 Рік тому

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

  • @nelson_k_d
    @nelson_k_d 4 місяці тому

    Thanks a Ton Chandeep!!
    Great help, awesome explanation.
    I found a better way to do this as follows courtesy "Excel Off The Grid":
    =Table.ExpandTableColumn(PreviousStep, "Data", Table.ColumnNames(Table.Combine(PreviousStep[Data])))

  • @daler.abdulloev
    @daler.abdulloev 2 роки тому +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 :)

  • @mathew9665
    @mathew9665 Рік тому

    That was a lovely solution - do you have a feel for performance at scale (say 500k rows +)

    • @GoodlyChandeep
      @GoodlyChandeep  Рік тому +1

      I don't see a performance issue since we're only renaming the columns.
      Although excel as a source data can be slow in Power Query

  • @மின்விரிதாள்_விரிப்போம்_வாங்க

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

  • @janakchetri7731
    @janakchetri7731 6 місяців тому

    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.

    • @odallamico
      @odallamico 5 місяців тому

      Hi. If the records in the columns you are referring to are not related, you can make 3 queries, one for each sheet, and convert each table into a list using table.tocolumns. Here you have 3 lists in 3 queries. Next, you should use list.Combine, combining these 3 queries, and finally use the table.fromcolumns function to convert into a table again. On the other hand if they are related, you should use merge querys in the ribbon of power query editor

  • @karimallahwala7022
    @karimallahwala7022 2 роки тому

    Very good content and very useful.Thank very much

  • @daXcel7448
    @daXcel7448 Рік тому

    Thanks for the video!. May I know the name of the mic you use to record the videos?

  • @tiwarirr
    @tiwarirr 2 роки тому

    Simply Gold Content as always.

  • @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.

  • @januszb4494
    @januszb4494 2 роки тому

    Thank you, I really needed this solution! :)

  • @sumardjo
    @sumardjo 6 місяців тому

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

  • @patrickkinbonso1809
    @patrickkinbonso1809 8 місяців тому +1

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

  • @Altaf_Alam
    @Altaf_Alam 6 місяців тому +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 🙏

    • @odallamico
      @odallamico 5 місяців тому

      Where are located those tables you are refering? One woorkbook or multiple woorkbooks?

  • @danag5717
    @danag5717 5 місяців тому +1

    This video is gold. ❤

  • @patrickkinbonso1809
    @patrickkinbonso1809 9 місяців тому

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

  • @maxzr
    @maxzr 2 роки тому

    Fantastic!!!! Thanks for sharing! Non about this theme question, what tool do you use to "draw" squares in your screen while presenting? 😅

  • @jaspreetsingharora7070
    @jaspreetsingharora7070 Рік тому

    Hi Chandeep, Great solution. Is there a way to append queries when we have 100's of columns? Is there a way to use something like wild card enteries in power query? So if header have a partial match it can still append in that relevant column. We have a messy data which we are extracting from other old system but they do add random characters at the end of each column everytime we fetch detailed report. Once again many thanks. Learning a lot from your videos and in future looking forward to even do your courses.

  • @suhaimiabdazais
    @suhaimiabdazais Рік тому

    Really well explanation.. Just subscribed...

  • @ktalwandi
    @ktalwandi 2 роки тому

    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.

  • @anilkakade5793
    @anilkakade5793 2 роки тому

    Thanks a lot ! It’s very helpful ❤

  • @__HumanBeing
    @__HumanBeing Рік тому

    Very good and very useful trick Chandeep! Thank you very much.
    I found that if we hardcode the rename values in a custom column with "ifs" and "List.AnyTrue", we can skip the manual rename each time the sources change.
    Even better, we can create a function for renaming, and use it and update it as needed 🤷‍♂️
    The thing is, the rename with 6-10 columns is very easy, but 30 and more.. uff 😥

    • @__HumanBeing
      @__HumanBeing Рік тому

      Idk, there must be a better way.. Idk

  • @alokkumarsahu228
    @alokkumarsahu228 13 днів тому

    Hey Goodly! Can explain it the same with dynamic sharepoint folder path, but I have data in subfolders as well.

  • @hskalsi832
    @hskalsi832 2 роки тому

    Genius ho bhai aap …

  • @danieladoro
    @danieladoro 2 роки тому

    Thank you so much, this was very helpful

  • @ronischuetz
    @ronischuetz 11 місяців тому

    can you explain the step how you open your column headers from PowerBI in Excel? Dont find an option that I can execute the Data-> From TableRange (on min. 9:04) that its loading the data into the same PowerBI instance. thank you and its a great video

    • @GoodlyChandeep
      @GoodlyChandeep  11 місяців тому

      You cannot.
      Instead you can one query running in excel to manage the headers.
      And the second query can pull that data from excel to transform the headers in Power BI

  • @umeshsawant2007
    @umeshsawant2007 Рік тому

    This is really good .. got lot to learn

  • @matt.dupuis
    @matt.dupuis Рік тому

    If we're given a variety of files which, some have 'ready to promote' header rows on top and some have an extra row that needs to be deleted first. Would each file need to have its own 'pre'-query to address this?
    Great stuff BTW! 🙂

    • @GoodlyChandeep
      @GoodlyChandeep  Рік тому +1

      This might help - ua-cam.com/video/Un4VEDwUjQs/v-deo.html

    • @matt.dupuis
      @matt.dupuis Рік тому

      @@GoodlyChandeep you're awesome. I'm still learning... The video you suggested doesn't 100% get me to the finish line but it is an important piece of this puzzle. I'm having fun working it out. 🙂
      Thanks for the reply!
      🏆

  • @lt3464
    @lt3464 3 місяці тому

    This was helpful, however, what if there are many columns in two sheet which are not needed in the final output?

  • @Travel-Costa-Rica
    @Travel-Costa-Rica Рік тому

    Hi Chandeep. Great channel. I love the way you explain stuff. I wonder if at some point we could work together to teach in Spanish. Let me know if this would be something you may be interested on.

    • @GoodlyChandeep
      @GoodlyChandeep  Рік тому

      my Spanish is as good as my German 😂
      not sure how is it going to work ?

  • @KuldeepSingh-nq1vi
    @KuldeepSingh-nq1vi 2 роки тому

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

  • @wayneedmondson1065
    @wayneedmondson1065 2 роки тому +1

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

  • @sherinthomas801
    @sherinthomas801 2 роки тому +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!