Automatically Remove Top Junk Rows & Combine Data from Multiple Excel Files

  Рет қаралды 34,535

Goodly

Goodly

Жыл бұрын

Check out our newly launched M Language course ↗️ - goodly.co.in/learn-m-powerquery/
In this video, we will learn to remove junk rows from the top and combine data from multiple Excel files. We will explore three Excel files, each containing a few unwanted rows at the top. Our goal is to remove this inconsistent number of junk rows and merge the data from all the files automatically.
===== 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/automatically-re...
===== CONTACT 🌐 =====
Twitter - / chandeep2786
LinkedIn - / chandeepchhabra
Email - goodly.wordpress@gmail.com
===== 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!

Пікірлер: 118
@nelson_k_d
@nelson_k_d 23 күн бұрын
I saved the entire syntax as follows: Add Custome Column =Table.PromoteHeaders(Table.Skip([Data], each not List.ContainsAny( Record.ToList(_), {"Header1", "Header2"} ))) Works wonders!! Thanks a ton bro!!
@odallamico
@odallamico 22 күн бұрын
Dear, you are a genius. You make M language look so easy. I appreciate your videos, my respects to you.
@OmisileKehindeOlugbenga
@OmisileKehindeOlugbenga 11 ай бұрын
Pretty awesome! Thanks a lot for this. Record, Table and List object manipulation in one video for one task without using "Remove Other Columns"
@iankr
@iankr Жыл бұрын
Brilliant! Many thanks, Mr Goodly.
@santiagovillamoreno6821
@santiagovillamoreno6821 11 ай бұрын
Beautiful Power Query techniques!!
@rhaps2008
@rhaps2008 Жыл бұрын
Amazing, I have had to struggle through with this exact issue to manually remove those junk rows, your a life saver I will be using this in the future
@tARasKoni
@tARasKoni Жыл бұрын
M-Masterpiece! Packing a lot of slick tricks in one video. Thank you Chandeep!
@decentmendreams
@decentmendreams 9 ай бұрын
Your methods become so refined over time . Awesome job
@Phippsy23
@Phippsy23 Жыл бұрын
Amazing, I've done this with a fixed Skip value but this is on another level! Thanks
@roywilson9580
@roywilson9580 Жыл бұрын
Thanks for the video. Much better than only skipping rows to one hardcoded value, makes sense to use if your column order is not the same across data tables.
@ramonillarramendi3191
@ramonillarramendi3191 7 ай бұрын
Wow..Amazing. Been struggling with removing dynamically the junk and with custom headers for a while now. This works like a charm. Thanks a mill.
@retamapark
@retamapark 6 ай бұрын
Thanks, Chandeep! I knew you had posted this, and I had this problem today. I was fooling around with different other approaches that were a mess. This was perfect!
@goodnewskasparyaodzramedo9097
@goodnewskasparyaodzramedo9097 11 ай бұрын
This is wonderful @Goodly. I watch all your videos. From the logic to the solution of the problem and the actual solution. God continually bless you, you are a messiah!
@inaction2024
@inaction2024 7 ай бұрын
This is a lifesaving technique. Thank you for sharing with us.
@davidjosevarelagarcia7011
@davidjosevarelagarcia7011 Жыл бұрын
Great , excellent. Simple like that. Thanks.
@vl21i
@vl21i 11 ай бұрын
Super Awesome, Chandeep. Very powerful formulas that you are teaching in a simple and easy understandable way ! Power Query and DAX are having lot of hidden treasures
@pmsocho
@pmsocho 3 ай бұрын
Awesome. Great logic. Thanks for the video.
@ursvenky6394
@ursvenky6394 Жыл бұрын
Awesome video. I was struggling earlier. I had work by using macro. This is very cool. Thanks Goodly
@rajanpradeepankarath8846
@rajanpradeepankarath8846 Жыл бұрын
yeah that is pretty damn awesome, Chandeep. this is an everyday challenge
@ShubhamSharma-ls6hj
@ShubhamSharma-ls6hj Жыл бұрын
Very well explained thanku so much brother.
@rohitwaradpande2492
@rohitwaradpande2492 11 ай бұрын
This was awesome video. Thanks for the same. I liked the trick that you used to removed the blanks dynamically.
@zahir585
@zahir585 Жыл бұрын
Genius 🔥 thank you my friend sooo helpful ❤️❤️❤️
@zeinh5139
@zeinh5139 11 ай бұрын
Wow ! thank you
@justinwduff
@justinwduff 11 ай бұрын
Thank you, SO MUCH! Had about 200 files to combine with various junk rows up top and now I can do it :D
@GoodlyChandeep
@GoodlyChandeep 11 ай бұрын
Woah.. thats a lot of files. I am glad I could help
@Ratnakumarwrites
@Ratnakumarwrites Жыл бұрын
Super Video Chandeep.
@tiagocarvalhal4502
@tiagocarvalhal4502 Жыл бұрын
Incredible. Thanks :)
@user-sn8vk9lt4o
@user-sn8vk9lt4o 4 ай бұрын
I am actually learning power query its Excellent. I like the way to teach. Thank u so, Much for this video.
@jianlinchen7978
@jianlinchen7978 2 ай бұрын
really very helpful. Thanks . It is a good idea
@chrism9037
@chrism9037 Жыл бұрын
Fantastic Chandeep, thank you!
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad you liked it !
@user-tp3jq8qg8l
@user-tp3jq8qg8l 4 ай бұрын
admiring the brilliance
@syrophenikan
@syrophenikan Жыл бұрын
Fantastic! This is definitely going into my daily routine.
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Enjoy! 😉
@joukenienhuis6888
@joukenienhuis6888 9 ай бұрын
Thanks again for such a great clear videobabout the next step in PowerQuery. I am new in PowerQuery, but i am experimenting on DAX and you are giving a great explanation
@stefankirst3234
@stefankirst3234 Жыл бұрын
Really awesome!
@arbazahmad7177
@arbazahmad7177 Жыл бұрын
Fantastic 🎉.. Thanks 😊
@mohamedheltoukhy2355
@mohamedheltoukhy2355 8 ай бұрын
Amazing Thanks alot
@Chillman666
@Chillman666 Жыл бұрын
You have no idea how much Power Query has helped me to automate my tasks. Also I have been struggling with this problem. A big THANK YOU ❤!
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Happy to help! 😉
@MrKamranhaider0
@MrKamranhaider0 Жыл бұрын
JUST AMAZAING SUPERB
@gennarocimmino
@gennarocimmino Жыл бұрын
I would say simply amazing !!!!
@rahulmahajan5932
@rahulmahajan5932 Жыл бұрын
Awe Stucked... No Words to Express How Fantabulous It is
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks Rahul :)
@emilmubarakshin49
@emilmubarakshin49 9 ай бұрын
Fantastic video and amazing explanation!
@GoodlyChandeep
@GoodlyChandeep 9 ай бұрын
Many thanks :)
@cherianiype
@cherianiype Жыл бұрын
ooff!! SHABASH! Terrific video Chandeep! Superb!! Sixer Maar diya!
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks 😉
@Rice0987
@Rice0987 Жыл бұрын
Magosh... It's just simple brilliant!💎 Thanks a bunch for yor priceless help!🤗👦
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks :)
@manojsakthi6201
@manojsakthi6201 11 ай бұрын
its very awesome, i hade a similar issue had to work around it, but this looks pretty good
@hassanjatta4257
@hassanjatta4257 Жыл бұрын
Awesome!!!
@aahanavikram07
@aahanavikram07 Жыл бұрын
You hear the problem it seems😂 I was using filter method and removing null values and a lot of other filter method. Thanks for making the work easier and cleaner ❤
@itgyantricks7218
@itgyantricks7218 11 ай бұрын
excellent
@abhijitmodak3461
@abhijitmodak3461 5 ай бұрын
Thanks!
@GoodlyChandeep
@GoodlyChandeep 5 ай бұрын
Thanks a lot Abhijit :)
@swathimanda5342
@swathimanda5342 Жыл бұрын
Hi Goodly, That was an amazing video. I learned a lot from your videos for my daily tasks with excel. It saves lot of my time. God bless you. I have a question please if you can answer that, when I covert pdf to excel most of the column values are not aligned into 1 column but locate on either side. Ex: column B dates, should be in column B but on few rows it will be on A or C. How can I align them into just 1 column B. Please advise. Thank you for all your great videos. 🙏
@josealvesferreira1683
@josealvesferreira1683 9 ай бұрын
very nice
@bulbulahmed4414
@bulbulahmed4414 Жыл бұрын
Amazing
@RogerStocker
@RogerStocker Жыл бұрын
unbelievable crazy as usual.
@setantadundalk
@setantadundalk Жыл бұрын
Very sleek. I had this very same issue but I used List.Generate to loop through each record which suppose would take slightly more processing time but nothing you would ever notice.
@j_baisley_
@j_baisley_ 4 ай бұрын
Damn awesome is right 👍
@stephenandrews1291
@stephenandrews1291 6 ай бұрын
this is awesome; thank you! one question - i need to add a column into the combined file that shows the original source filename for each record... where in the flow and how best to do that please?
@udayteja6595
@udayteja6595 9 ай бұрын
Great
@boissierepascal5755
@boissierepascal5755 11 ай бұрын
Power query is magic ! You are a wonderful magician 🪄
@bohdanduda652
@bohdanduda652 Жыл бұрын
Another way, how we can do it, it is add additional column using List.PositionOf and due to that calculate in which position we have Date and Profit
@Donkeys_Dad_Adam
@Donkeys_Dad_Adam Ай бұрын
This is great! What is the best way to do this when your source files are not formatted as Tables, but are simply Excel Worksheets?
@wensesvincen4877
@wensesvincen4877 Жыл бұрын
Hi Goodly, Wonderful and Powerful Trick...Keep up the good work. What if you are importing from PDF files...Trying to convert the binary gives a different results.
@noorbisharmohamed
@noorbisharmohamed Жыл бұрын
Fantastic! But can we use "is blank" instead of "not Contain any" as the condition? Or promote headers if record contains any " Date", "Amount" etc?
@excel-in-g
@excel-in-g Жыл бұрын
As always, very neat & clear stuff. 👍 I was wondering if one can't use Table.FindText? Like, each Table.Skip( _,Table.PositionOf(_, Table.FindText(_, "Profit"){0} ))) But only testing for 1 column header here.
@ankursharma6157
@ankursharma6157 11 ай бұрын
Token of Gratitude!
@GoodlyChandeep
@GoodlyChandeep 11 ай бұрын
Thank you so much Ankur
@rogeriopsvalle
@rogeriopsvalle 9 ай бұрын
Hi Goodly. Thanks for all videos. They are just great. I need to combine two of your tricks in just one. I have many sheets with junk lines (same number of junk lines for all sheets) and these same sheets have inconsistent columns. How do I do that? Thanks in advance
@GoodlyChandeep
@GoodlyChandeep 8 ай бұрын
You code to remove the junk headers can probably be Table.Skip ( Table, List.MatchesAny(Record.ToList(_), each _ "null" or each _ "") After this you can promote the headers and then follow the inconsistent header video.
@andreass.3130
@andreass.3130 Жыл бұрын
Hi Goodly, thanks for all your great videos. Isn't there a simpler way to do it here? In the example file you create a conditional column (If Column1=Date Then True). Then you fill the conditional column downwards. Now you have a True for all rows you need and a null value above the desired header row. So you can filter for True. Shouldn't that be dynamic as well?
@DAXifiedSatish
@DAXifiedSatish Жыл бұрын
No. In that way if u filter true it will be with junk rows and all data except headers and if u filter for false u will get only headers
@SandhyaSingh-qk6up
@SandhyaSingh-qk6up Жыл бұрын
Can this also be solved by using index number and custom function?
@mohitchaturvedi8931
@mohitchaturvedi8931 Жыл бұрын
Delighted, this is the problem of every hour. Many times data come with merged header, which you have sorted already,
@babakmohammadi9931
@babakmohammadi9931 8 ай бұрын
could you possibly tell me what do i have to do with CSV files for "Table.TransformColumns(Source, {"Content", Excel.Workbook})" as that dosent work for CSV
@patrickharilantoraherinjat2994
@patrickharilantoraherinjat2994 11 ай бұрын
Great video Goodly ! what if I have a junk rows and also a junk columns. is it possible to combine? Thanks
@GoodlyChandeep
@GoodlyChandeep 11 ай бұрын
Thanks Patrick. May this video will help kzbin.info/www/bejne/Z5fRaZmOjtxpg5Y
@ajay249
@ajay249 10 ай бұрын
Goodly is just too Godly.
@cooolbreeze
@cooolbreeze 10 ай бұрын
Pretty cool. Seems the only thing that would limit what one can do with PQ is one's imagination. Question, why List.ContainsAny instead of List.ContainsAll?
@starprinceofficial9603
@starprinceofficial9603 2 ай бұрын
For me my question if we need to bring the data before the columns as a new column before promoting headers, how do we go about it
@huyuc6614
@huyuc6614 6 ай бұрын
Hi i stuck on the step transform column. My file is .csv file not xlsx so when i use transformcolumn, it show error on the content. Do you know how to fix it
@eslamfahmy87
@eslamfahmy87 11 ай бұрын
Actually, I think you are the only youtuber instructor who is preparing depth & creative PQ examples. Really, fantastic 👏, elegance & more simple 😊
@devendrareddynamballa1053
@devendrareddynamballa1053 Ай бұрын
What if we want to add back the removed rows after promoting the headers
@eslamfahmy87
@eslamfahmy87 11 ай бұрын
If the name & kind of data which extracted into PQ it's inconsistent and i need to filter out for all non needed sheets, How can work with that sheet
@denissipchenko2455
@denissipchenko2455 Жыл бұрын
Thanks for sharing! But looks like there should be List.ContainsAll instead of List.ContainsAny
@excel-in-g
@excel-in-g Жыл бұрын
Was thinking the same.
@PandaVlademirBerlin
@PandaVlademirBerlin 2 ай бұрын
What if i need the source.file column?
@ankitachauhan5834
@ankitachauhan5834 Ай бұрын
How to do same thing but fro CSV file
@williamarthur4801
@williamarthur4801 Жыл бұрын
This may sound like a stupid question, and I'm sure it's something basic, but why do you get Name = Sheet , Data = Table, but I always have Name= table , Name = Sheet and adjacent Data = table, Data = table ? Oh, and loved the use of a condition for skip which I'd never thought of, even though now having looked it does say count or condition.
@cdmkk2211
@cdmkk2211 5 ай бұрын
How can I add files name as a column in this
@markp8600
@markp8600 Жыл бұрын
Fabulous video , but it is difficult to see the "Applied Steps" at the end of the video. Question: what if the junk rows and "junk row data" are spread inconsistently through the spreadsheet. For example, the fund or department information may change resulting in blank rows between datasets and header rows when a new fund source or department is identified in the report. The example shows how to remove junk rows at the top of the report for 3 reports. Do you have any videos where the junk rows would be sporadically located throughout the report?
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Mark, I'll have to take a look at the data to give you possible ways to solving it. See if you can pick any tricks from this long video - kzbin.info/www/bejne/lYuuhWSolqhnhpI I've shared horizontal and vertical looping techniques in this video.
@markp8600
@markp8600 Жыл бұрын
@@GoodlyChandeep - Hi Chandeep, I could share a file with you on your website. I could upload on the PQ training course site. Would that work? Thanks for the great insights!
@markp8600
@markp8600 Жыл бұрын
@@GoodlyChandeep Perfect! Thank you so much Chandeep. Your help and guidance is greatly appreciated. Cheers!
@haroldmadrigal3671
@haroldmadrigal3671 2 ай бұрын
it fails when there is #ref or formulas(lookup) in the junk rows
@carolshipley7903
@carolshipley7903 13 күн бұрын
Hi. Can you give me away of doing this if there is more than one worksheet in the excel file and you only want to clean just one worksheet?
@GoodlyChandeep
@GoodlyChandeep 13 күн бұрын
If you're connecting to a single xl file, you'll have to apply a filter before the Navigation Step to restrict the sheet names that you want.
@retamapark
@retamapark 6 ай бұрын
Not as sophisticated, but say you had a table with two columns, Col1 and Col2. There are junk rows at the top. The row with headers has the values "Date" and "Amount". This seems for work and is easy to implement. let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], Custom1 = Table.Skip(Source, each [Col1] "Date" and [Col2] "Amount") in Custom1
@retamapark
@retamapark 6 ай бұрын
fnTableSkipDynamic(Source, "Col1", "Date", "Col2", "Amount") Function to do this: Input column names as text, header values as text. (sourcetablename as table, col1name as text, header1value as text, col2name as text, header2value as text)=> let return = Table.Skip(sourcetablename, each ( Record.Field(_, col1name) header1value) and ( Record.Field(_, col2name) header2value) ) in return
@GoodlyChandeep
@GoodlyChandeep 6 ай бұрын
List.matchesall can look for both the headers. 👍
@odallamico
@odallamico 22 күн бұрын
Does this process also apply to delete the lastN rows? I am trying but it does not work
@odallamico
@odallamico 22 күн бұрын
I have been working in the case of TABLE.REMOVELASTN, but using the text.contains function to place part of the required text as a condition: LowerRowsRemoved = Table.RemoveLastN(Header, each not List.Contains( List.Transform(Record.ToList(_), each Logical.ToText( Text.Contains(_, "Word")), "true"))) where Word is part of a word (e.g. Worder). The function works perfectly, returning as in your video, a column with FALSE or TRUE, where False is the condition record. But to make it work, I had to change the type of the added column to text type, before applying the function copied above because it gave me the error: Expression.Error: We cannot convert the value true to type Text. Details: Value=TRUE Type=[Type] In your case (to delete top rows) this was not necessary. Would you have any idea why in one case it is necessary to change type in one case and not in another? Thank you
@odallamico
@odallamico 7 күн бұрын
After several hours of study and modifications, I realize that even in your video, with having placed: Table.Skip(#“Added Custom”, [Custom]), at minute 5.57 the function works and recognizes without problem the rows to be deleted. That means, the condition is not necesary put it in the argument, because the condition is in the Custom Column added
@deepraazshaw7369
@deepraazshaw7369 11 ай бұрын
Sir, can we get all these videos in Hindi?
@user-ni9sj8gv2o
@user-ni9sj8gv2o Жыл бұрын
Hi Chandeep, i want to enroll your course about Dax and Data Modelling (Bundle), can you give me some discount? hehe it's too expensive for me :(
@Piyush.A
@Piyush.A Жыл бұрын
😯😨😲
@abhiadfree6331
@abhiadfree6331 10 ай бұрын
Lets name you the M-man...
@utkur765
@utkur765 Жыл бұрын
Why not to use 2 column and filter out "null"? This will remove all just rows from all files.
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Column 2 can have legit null values
@excel-k-sir
@excel-k-sir 11 ай бұрын
Bhai I am sure you have definitely made your hands dirty in cleaning up the Consolidated Account Statement for MF. Can you please create a video on how to clean up the Statement.
@DJPejsen
@DJPejsen Жыл бұрын
Source = Folder.Files("C: \Users\pc\Desktop \Remove Top Rows"), ContentTbl = Table.TransformColumns( Source, { "Content", each Excel.Workbook(_) } ), ExpandData = Table.ExpandTableColumn( ContentTbl, "Content", {"Data"}, {"Data"} ), TableSkipRows = Table.PromoteHeaders( Table.TransformColumns( ExpandData, { "Data", each Table.Skip(_, each [Column1] "Date" or [Column5] "Profit")) } ) )
@eslamfahmy87
@eslamfahmy87 10 ай бұрын
kzbin.info/www/bejne/i5-Xh3h6rLqdh9U what the difference between the 2 tutorials
@sergioalbar
@sergioalbar Ай бұрын
Amazing, you are a real crack !
@brightonalbert3237
@brightonalbert3237 Жыл бұрын
Great
2000000❤️⚽️#shorts #thankyou
00:20
あしざるFC
Рет қаралды 15 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:19
CRAZY GREAPA
Рет қаралды 7 МЛН
🍟Best French Fries Homemade #cooking #shorts
00:42
BANKII
Рет қаралды 61 МЛН
Balloon Stepping Challenge: Barry Policeman Vs  Herobrine and His Friends
00:28
Remove Top Rows and Combine Data from Multiple Excel Files
13:42
5 Surprising Power Query Tricks You Need to Know!
14:14
Goodly
Рет қаралды 29 М.
10 awesome Power Query tricks you NEED to know! | Excel Off The Grid
15:44
Excel Off The Grid
Рет қаралды 20 М.
12 Pro PivotTable Formatting Tricks = No more UGLY PivotTables!
12:12
MyOnlineTrainingHub
Рет қаралды 317 М.
Combine Files with DIFFERENT Headers in Power Query | TWO Examples
11:47
Power Query - Faster & Easier Parameters
13:38
BCTI
Рет қаралды 32 М.
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 13 МЛН
AI от Apple - ОБЪЯСНЯЕМ
24:19
Droider
Рет қаралды 112 М.