Consolidate Multiple Excel Worksheets using Power Query Custom Functions

  Рет қаралды 21,889

Access Analytic

Access Analytic

Күн бұрын

A common request on forums and in the training classes we run is "how do I consolidated multiple sheets into a summary?"
Power Query can do it, I step you through how I would approach it.
Techniques covered include
- Creating a custom function (via the User Interface)
- Unpivotting
- Load destinations (sheet v data model)
Tip: Make sure your Power Query formula bar is on via the View menu in the Power Query Editor.
Link to a demo file and the solution: aasolutions.sharepoint.com/:f...
Note: This process can be easier when you are consolidating sheets from an external workbook (you can actually get a list of the sheet, table and range names rather than having to manually create one). So if you’re looking to consolidate multiple sheets from a different Excel file then check out the 5 minute mark of this video • Power BI Hidden Gems
I’m using Power Query in Power BI but the technique is the same for Power Query in Excel
Check out our blog: www.accessanaltyic.com.au/blog

Пікірлер: 78
@SyrianAtheist
@SyrianAtheist 6 ай бұрын
I am not sure which one terrifies me the most: the amount of functionality within Excel that I was oblivious to, or the amount of knowledge you have that I am in awe of.
@AccessAnalytic
@AccessAnalytic 6 ай бұрын
Hah, we’re all beginners along the way. I’ve been a full time Excel consultant and trainer for 17 years and still only know about 70% of Excel
@ivosilva2796
@ivosilva2796 Жыл бұрын
A whole new world everytime I get to crossroads at work and have to dig deeper online for information. Excel never stops to amaze me. Great video!
@AccessAnalytic
@AccessAnalytic Жыл бұрын
Thanks, you're welcome
@ivangardiner66
@ivangardiner66 3 жыл бұрын
Absolutely awesome video! I have never been able to get my head around functions in PQ, you make it so easy. Looking forward to applying this technique loads going forward. Thank you so much
@AccessAnalytic
@AccessAnalytic 3 жыл бұрын
Glad to help, thanks for leaving the kind feedback Ivan
@cristianchelu1563
@cristianchelu1563 Жыл бұрын
You are making it look so simple. Well done!
@AccessAnalytic
@AccessAnalytic Жыл бұрын
Thanks!
@IvanCortinas_ES
@IvanCortinas_ES 3 жыл бұрын
Excellent video tutorial Wyn. Very useful and well explained. Thank you so much for sharing it.
@AccessAnalytic
@AccessAnalytic 3 жыл бұрын
You’re welcome Iván. Thanks for commenting
@sedarathnadcd
@sedarathnadcd Жыл бұрын
Wooow, i was finding this function all over the youtube, finally got it. thank you.
@AccessAnalytic
@AccessAnalytic Жыл бұрын
Great. Glad it helped Priya
@bojanjovanovic756
@bojanjovanovic756 3 жыл бұрын
Thank you Sir, you saved me planty of time next week!
@AccessAnalytic
@AccessAnalytic 3 жыл бұрын
You're welcome Bojan, thanks for letting me know
@90hsilva
@90hsilva 2 жыл бұрын
Very good video Wyn, I found an easy way to convert the query into a function awesome!!!
@AccessAnalytic
@AccessAnalytic 2 жыл бұрын
Thanks Humberto, glad it helped and thanks for leaving a comment.
@lasirena07
@lasirena07 Жыл бұрын
Very clear, very helpful, thank you!!
@AccessAnalytic
@AccessAnalytic Жыл бұрын
You’re welcome Maricela. Thanks for taking the time to leave a kind comment
@MrWish332
@MrWish332 2 жыл бұрын
Wow, Thank You So Much Wyn, really very useful.
@AccessAnalytic
@AccessAnalytic 2 жыл бұрын
You’re welcome Vishal
@realpulsecoin
@realpulsecoin 3 жыл бұрын
Love every little tips on the way, great content and presention 👍 #Greetings from Norway
@AccessAnalytic
@AccessAnalytic 3 жыл бұрын
Thanks for the kind feedback Rasmus.
@MrKamranhaider0
@MrKamranhaider0 2 жыл бұрын
Very useful .
@cheikhhakim5864
@cheikhhakim5864 Жыл бұрын
lot of thanks sir
@AccessAnalytic
@AccessAnalytic Жыл бұрын
You’re welcome
@9699975917
@9699975917 2 жыл бұрын
Just amazing
@AccessAnalytic
@AccessAnalytic 2 жыл бұрын
Thanks Bhavesh
@Breezy89er
@Breezy89er 5 ай бұрын
Well Done!!
@AccessAnalytic
@AccessAnalytic 5 ай бұрын
Thanks
@largpack
@largpack 5 ай бұрын
the next level is to consolidate multiple tables/sheets from multiple files - also possible with PQ
@AccessAnalytic
@AccessAnalytic 5 ай бұрын
Yes absolutely
@accountsdepartment7444
@accountsdepartment7444 Жыл бұрын
great work
@AccessAnalytic
@AccessAnalytic Жыл бұрын
Cheers
@DanielBula1964
@DanielBula1964 3 жыл бұрын
On the Date Change Type step, instead of extracting before delimiter, you could change to date/time type and then to date. It should work. Thanks for sharing your knowledge!
@AccessAnalytic
@AccessAnalytic 3 жыл бұрын
Great tip Daniel (as long as you add the Date change as a new step)
@DanielBula1964
@DanielBula1964 3 жыл бұрын
@@AccessAnalyticYes sir, you got it!
@louism.4980
@louism.4980 Ай бұрын
Thank you so much, very useful stuff! :)
@AccessAnalytic
@AccessAnalytic Ай бұрын
Glad it helped 😃
@Luciano_mp
@Luciano_mp 3 жыл бұрын
Good. Thank you!
@AccessAnalytic
@AccessAnalytic 3 жыл бұрын
No worries Luciano
@GeertDelmulle
@GeertDelmulle 3 жыл бұрын
Nice video. Here are some suggestions for you: • look into the function Excel.CurrentWorkbook to get your tables (just make sure you exclude the ones you don't want). It's easy. • remove unwanted rows before using unpivot. • try changing data type using Locale (EN-US?). On the audio aspect: try easing down a bit on the plosives and use a de-esser, either during recording or in post. Keep up the good work! Really enjoy it! :-)
@AccessAnalytic
@AccessAnalytic 3 жыл бұрын
Thanks for the tips Geert
@ajaysharma2061
@ajaysharma2061 2 жыл бұрын
Awesome!
@AccessAnalytic
@AccessAnalytic 2 жыл бұрын
Thanks Ajay
@xyfo8784
@xyfo8784 Жыл бұрын
3:49-4:55 create parameter ProjectName, 4:59- pull the list of range names for the excel workbook for the Cleanup function to run against, 6:16-6:41 create the Cleanup function
@AccessAnalytic
@AccessAnalytic Жыл бұрын
I'm not sure what you are flagging here?
@TravelRunner
@TravelRunner Жыл бұрын
Great video, thank you. Do you have a video on how you made the dashboard you showed at the beginning of the video? Thanks!
@AccessAnalytic
@AccessAnalytic Жыл бұрын
Hi, I don't have anything specific but the general approach is in the last 2 minutes of this video.
@elfridhasman4181
@elfridhasman4181 2 жыл бұрын
Awesome 🤣🙏
@khalidmajeed2886
@khalidmajeed2886 Жыл бұрын
Mashallah sir
@AccessAnalytic
@AccessAnalytic Жыл бұрын
Thanks
@jazzista1967
@jazzista1967 3 жыл бұрын
HI Wynn....great tutorial... quick question: in order to create the cleanup function is a 3 steps process: your transformations , parameter creation and then with that parameter you created you converted into a function? Could you skip the parameter and create the function directly after your transformations? Thanks for posting
@AccessAnalytic
@AccessAnalytic 3 жыл бұрын
Hi, thanks. You must have a parameter to create a function.
@hasankocyigit
@hasankocyigit 2 жыл бұрын
Thank you very much, it is really nice video. Just I want to ask you; if the source is different such as Excel file, how can we change the source step?
@AccessAnalytic
@AccessAnalytic 2 жыл бұрын
Thanks Hasan, if you’re looking to consolidate multiple sheets from a different Excel file then check out the 5 minute mark of this video kzfaq.info/get/bejne/gdhjgZN809a1coU.html I’m using Power Query in Power BI but the technique is the same for Power Query in Excel
@TheSTEPHEN009
@TheSTEPHEN009 3 жыл бұрын
Sir where do I find the practice workbook. Please help. If you don't mind it sharing as I found it useful as well as fascinating.
@AccessAnalytic
@AccessAnalytic 3 жыл бұрын
Hi, I've just posted a link in the description section
@TheSTEPHEN009
@TheSTEPHEN009 3 жыл бұрын
@@AccessAnalytic Thank you Sir..
@MrKamranhaider0
@MrKamranhaider0 2 жыл бұрын
Secondly do it work if instead of named range we craete table using Ctrl+t on each sheet.
@AccessAnalytic
@AccessAnalytic 2 жыл бұрын
Yes it works the same with Tables
@RIMI9793
@RIMI9793 Жыл бұрын
👏👏👏👏
@AccessAnalytic
@AccessAnalytic Жыл бұрын
😀
@VMarius-gm2vd
@VMarius-gm2vd Жыл бұрын
Hi, want to connect two product feeds in csv format to update a stock according to sku, automatically every 6 hours, and how do I make the resulting file can be exported live for the web site to use that data for stock update, thanks, have a great day.
@AccessAnalytic
@AccessAnalytic Жыл бұрын
Not to sure on that one. Maybe some VBA needed or Power Automate Desktop to automate the scheduling of the refresh and export.
@Vizurraga
@Vizurraga 2 жыл бұрын
I real want to master this. Could one do the same with Microsoft Power😀 BI? I'm barely starting my journey with Power BI and its one of the programs that I would like to eventually become very proficient in.
@AccessAnalytic
@AccessAnalytic 2 жыл бұрын
Hi John, absolutely. Power Query is the same in Power BI
@ahyongyong1728
@ahyongyong1728 Жыл бұрын
Recently i am facing "we didn't recognize the format of your first file ()...". Previously The same sharepoint folders and excel workbooks able to be imported with sharepoint folder connector just fine. Anyone facing similar issue? I am using power bi december 2022 version. I have tried using excel power query to open the same set of folder and files, and it worked.
@AccessAnalytic
@AccessAnalytic Жыл бұрын
Odd one. I'd post an issue here community.powerbi.com/t5/Issues/idb-p/Issues and also scroll down to Get Support powerbi.microsoft.com/en-us/support/
@MrKamranhaider0
@MrKamranhaider0 2 жыл бұрын
Sir when we load data through folder ,all sheets in workbook can be appended without declaring named range then what you say better way to load through folder which contain only on particular file.
@AccessAnalytic
@AccessAnalytic 2 жыл бұрын
I don’t quite understand sorry
@MrKamranhaider0
@MrKamranhaider0 2 жыл бұрын
@@AccessAnalytic if we load data from folder option and add collumn "Excel.workbook(content,true) then even sheets are appended .Under this method you don need to manually create ranges for each sheet
@AccessAnalytic
@AccessAnalytic 2 жыл бұрын
@@MrKamranhaider0 check out this video at 5.00 minutes.. kzfaq.info/get/bejne/gdhjgZN809a1coU.html is this what you are referring to?
@asjones987
@asjones987 3 жыл бұрын
I love your work, but you start out saying Power Query needs named ranges or tables to pull the data in to PQ. I have done Power Query many times without named ranges. I had an series of Excel files (same format) that had sheets with multi-line headers and other stuff that was in "presentation form". I was able to tell Power Query to open a file and transform the headers and data section etc. Then put it all back together.... no tables/named ranges required. There may be some extra cleanup required but all is good :)
@AccessAnalytic
@AccessAnalytic 3 жыл бұрын
You’re right Alan, I should have been clearer that I was referring to running a query within the same workbook. When referencing an external workbook you can also get the sheet objects.
@Amol51279
@Amol51279 2 жыл бұрын
Music at the end of video is too loud. It's deafening sound. Hurt a lot. Pl change 😞
@AccessAnalytic
@AccessAnalytic 2 жыл бұрын
Sorry about that. Thanks for watching to the end 😊
@jianlinchen7978
@jianlinchen7978 Жыл бұрын
Creating a function in Advanced Editor directly looks more simply. " (tablename )=> let Source = Excel.CurrentWorkbook(){[Name= tablename ]}[Content], #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]), #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Promoted Headers", {" Resource Name"}, "Attribute", "Value"), #"Filtered Rows" = Table.SelectRows(#"Unpivoted Other Columns", each ([Attribute] "TOTAL") and ([Value] 0)), #"Renamed Columns" = Table.RenameColumns(#"Filtered Rows",{{"Attribute", "Date"}, {"Value", "Hours"}}), #"Split Column by Delimiter" = Table.SplitColumn(#"Renamed Columns", "Date", Splitter.SplitTextByEachDelimiter({" "}, QuoteStyle.Csv, false), {"Date.1", "Date.2"}), #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Date.1", type date}, {"Date.2", type time}}), #"Removed Columns" = Table.RemoveColumns(#"Changed Type1",{"Date.2"}), #"Renamed Columns1" = Table.RenameColumns(#"Removed Columns",{{"Date.1", "Date"}}) in #"Renamed Columns1" ===========================
@AccessAnalytic
@AccessAnalytic Жыл бұрын
Ok, thanks
What are dataflows in Power BI?
9:57
Access Analytic
Рет қаралды 36 М.
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 170 #shorts
00:27
Always be more smart #shorts
00:32
Jin and Hattie
Рет қаралды 47 МЛН
Combining Excel Tables in a highly flexible way
12:18
Access Analytic
Рет қаралды 13 М.
How and why to Unpivot data with Power Query
16:40
Access Analytic
Рет қаралды 42 М.
How To Automate Data Tasks In Excel Using Power Query
15:52
Excel Campus - Jon
Рет қаралды 367 М.
Custom Functions Made Easy in Power BI
16:44
RADACAD
Рет қаралды 33 М.
Excel Data Modeling - Stop Using XLOOKUP | Learn PowerPivot
10:41
Professor Cubs
Рет қаралды 77 М.
PQ Challenge Splits and Lists
17:56
Access Analytic
Рет қаралды 12 М.
35 million watched superman video
0:13
Hasan Kaval
Рет қаралды 245 МЛН
Почему НИКА решила уехать из дома?
0:46
Привет, Я Ника!
Рет қаралды 1,8 МЛН