YouTube03 Mar 2025
13m

Power Query: A Cleaner Way to Import & Appends CSV Files The Transformative Power of M Code EMT 1872

Podcast cover

excelisfun

This episode explores a streamlined method for importing and appending multiple CSV files in Power Query using M code, contrasting it with the conventional, more cluttered "from folder" approach. Initially, the speaker digresses to solicit support for their book on M code, acknowledging its production flaws but emphasizing the value of its content. Against the backdrop of this appeal, the speaker introduces the Power Query goal: to consolidate data from several CSV files, each containing five years of stock data. The speaker advocates for a cleaner approach by avoiding the "Combine files" button, opting instead to filter for CSV files and extract ticker names using text manipulation. More significantly, the speaker introduces a technique using the 'let' expression to define variables within the M code, enabling efficient data transformation and appending without creating numerous custom functions. The method culminates in a concise code that appends the tables and selects specific columns, demonstrating a less complicated and cleaner data import process.

Outlines

Sign in to continue reading, translating and more.

Continue
 
mindmap screenshot
Preview
preview episode cover
How to Get Rich: Every EpisodeNaval