Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Power Query: A Cleaner Way to Import and Append CSV Files - The Transformative Power of M Code

ExcelIsFun via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn how to efficiently import and append multiple CSV files in this 14-minute tutorial that demonstrates the transformative power of M Code in Power Query. Discover a cleaner approach to extracting file names and adding them as new columns to each CSV table, avoiding the cluttered queries created by the Power Query User Interface. The tutorial walks through using the let expression to define variables that can access any scope variable in a formula with back-to-back Table functions, eliminating the need for Custom Function syntax. Follow along with practical demonstrations of Csv.Document, Table.PromoteHeaders, and Table.AddColumn functions while learning proper naming conventions for M Code identifiers. Download the accompanying Excel file to practice these techniques that streamline your data transformation workflow.

Syllabus

1. 00:00 Introduction
2. 00:10 excelisfun needs your help!
3. 00:16 Data Transforming Goal
4. 01:49 Start Process of importing multiple csv files and appending into a single table.
5. 02:12 Look at Power Query User Interface Method, which is very messy.
6. 02:33 Clean and prepare table of Cvs files.
7. 02:57 Proper naming convention for M Code Identifiers
8. 03:26 Extract name from file name that we need as an attribute in each csv table.
9. 04:17 Create Custom Column to transform Csv tables and add a new column that adds the file name attribute in each row of each table. See the functions. Csv. Document, Table.PromoteHeaders and Table.AddColumn
10. 07:01 Learn how to use the let expression to define a variable when you are using back to back Table functions and you need to access data from the first of the two tables inside the back to back Table.AddColumn functions.
11. 09:35 Append the csv tables and choose columns in same M Code step.
12. 13:05 Summary
13. 13:17 Closing

Taught by

ExcelIsFun

Reviews

Start your review of Power Query: A Cleaner Way to Import and Append CSV Files - The Transformative Power of M Code

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.