The Complete Excel Course with AI Integration

Power Query for e-commerce managers

Every channel sends its orders in a layout of its own: the site's export, each marketplace's report, settlement files, a target grid from planning. Joining them by hand eats a morning a week and invites mistakes. In The Complete Excel Course with AI Integration, SalesFusion, an industry-standard data project, gives that work to Power Query, and the lessons chosen here follow it through: cleaning, store rules inside the query, checks, merges, appends, a whole folder of files and Unpivot.

Taught by Sagnik Bhattacharya and Virginia Thorn

The Complete Excel Course with AI Integration: Sagnik Bhattacharya and Virginia Thorn

What you will be able to do

At work, you will be able to:

  • Open a channel's CSV order export in the Power Query Editor through Get Data and record its clean-up as steps, so next week's file from the same channel comes out clean at a refresh.
  • Rename each channel's headers to one shared set, then stack the exports with Append, so the site and every marketplace read as a single order table.
  • Strip symbols, commas, hyphens and NA entries out of order values, put SKUs and channel codes in capitals without stray spaces, and fix the data types, since Power Query treats a code in two cases as two codes.
  • Write store rules into the query: profit and margin on every line, Return wherever an amount is negative, High for orders past a set value, and one discount scale whichever way a channel types its rates.
  • Check a week of orders by grouping it in a QA query, totals and row counts for each month and region with the biggest first, before the numbers reach a report.
  • Merge product cost and category into every order line on its SKU, and surface the orders with no match, such as a SKU missing from the catalogue or an order missing from a payout.
  • Combine a folder of weekly order or settlement files into one query that takes in each new file at a refresh, with every row still traceable to its file.
  • Reshape a sales target grid with a heading per month into rows of month and amount with Unpivot, and put nothing but the finished table on a sheet, leaving the staging queries as connections.

Projects

What you will build.

The course has 14 industry-standard projects. These two matter most here.

  • Project 12

    SalesFusion

    A sales report that refreshes itself from a folder of files.

    The course's sales data project, built from deliberately messy CSV exports and lookup files: its Power Query lessons map the route a store's order, return and settlement exports can take to one clean table that every channel report reads.

  • Project 05

    SalesPlusPerformance

    A sales question answered in seconds, straight from the order data.

    The course's PivotTable project on order-level sales: where a cleaned query ends up as channel and product summaries with slicers, and where Refresh All brings each new week of orders into those summaries.

Tap or pinch to zoom in, drag to move around. Click or scroll to zoom in, drag to move around.

Lessons

The lessons that matter, in course order.

The Complete Excel Course with AI Integration has 186 lessons. This page picks out 17 of them, 1 h 36 min of video. Each lesson keeps its number in the course.

Where to start

Lesson 153 SalesFusion Power Query project

Start at Lesson 153 if your order exports already sit in Excel tables and a PivotTable is familiar: SalesFusion opens with its finished report as the goal and works back from raw CSV files. Tables new to you? Lesson 19 sets them up, and the PivotTable lessons that open at Lesson 57 show where a clean query ends up; starting from scratch, take Lesson 1 first. Already importing CSVs through Get Data? Jump to Lesson 163, where merging, appending and the folder query start.

17 of 186 lessons · 1 h 36 min

15 SalesFusion: advanced data tools and a Power Query modelling system 3 of 21 lessons · 13 min SalesFusion's goal and its raw files, the extract, transform and load idea, and a first CSV imported with Get Data and opened in the Power Query Editor with Transform Data, the choice that makes a clean-up repeatable rather than a one-off paste. Its files are exports of sales, close kin to a marketplace's order report.
  1. 153 Start here SalesFusion Power Query project Excel ETL pipeline and data model overview 5 min
  2. 154 Introduction to Power Query in Excel The ETL workflow explained 5 min
  3. 155 Import a CSV with Power Query Get data from text and transform data 2 min
15 SalesFusion: advanced data tools and a Power Query modelling system 4 of 21 lessons · 24 min The clean-up an order export needs: temporary columns removed and headers renamed, codes trimmed and set in capitals, symbols, commas and NA entries replaced, quantities spelled out in words corrected, discounts typed two ways put on one scale, and dates cleared of placeholders and given Year, MonthName and YearMonth fields.
  1. 156 Clean columns in Power Query Remove and rename columns for modelling 5 min
  2. 157 Clean text in Power Query Trim, clean, replace values and fix text case 6 min
  3. 158 Data types in Power Query Fix date, whole number, decimal and text types 7 min
  4. 159 Date columns in Power Query Add year, month and year-month fields for reports 7 min
15 SalesFusion: advanced data tools and a Power Query modelling system 3 of 21 lessons · 16 min Store rules and a control inside the query: profit, a margin that never divides by zero, a high-value flag and a return flag for negative amounts, then a Group By check of totals and row counts by month and by region, and Close and Load set so that staging work stays a connection.
  1. 160 Business logic in Power Query Custom and conditional columns for profitability 6 min
  2. 161 Group By in Power Query Summarise sales by month and region to validate data 5 min
  3. 162 Close and Load in Power Query Connection only, table or Data Model 5 min
15 SalesFusion: advanced data tools and a Power Query modelling system 3 of 21 lessons · 14 min Joining and stacking: product and region details brought onto every sales row by a Left Outer merge, a finished pipeline duplicated and pointed at another year's file, and both years stacked with Append in a query whose columns pair up by name.
  1. 163 Merge queries in Power Query Look up product and region names with a left join 5 min
  2. 164 Reuse a Power Query pipeline Duplicate queries for a new year of sales data 5 min
  3. 165 Append queries in Power Query Combine 2024 and 2025 sales tables 3 min
15 SalesFusion: advanced data tools and a Power Query modelling system 3 of 21 lessons · 22 min A folder of files split by period, combined and cleaned by one query with each row keeping its file's name, profit and fiscal year columns added, then a single fact table assembled from history, folder data and lookups and checked for nulls before it is held as a connection.
  1. 166 From Folder in Power Query Combine every sales file in a folder automatically 9 min
  2. 167 From Folder automation in Power Query Profit metrics and fiscal year columns 7 min
  3. 168 Build a sales fact table in Power Query Merge lookups and append history 6 min
15 SalesFusion: advanced data tools and a Power Query modelling system 1 of 21 lessons · 8 min Unpivot on an export that gives every month its own heading, with budget and target figures by region and category, reshaped into rows of month and figure. The step names the columns it keeps, not the months, so next month's heading cannot break it.
  1. 173 Unpivot columns in Power Query Turn wide month columns into a long table 8 min

Instructors

Who teaches it.

Virginia Thorn smiling at the camera, dark hair tied back, wearing a navy top.

Instructor, Excel with AI

Virginia Thorn

Emmy Award winner. Teaches Excel with AI at Coding Liquids.

Questions

Asked before starting.

My store sells on its own site and on marketplaces, and every channel exports its orders differently: can Power Query make them one table, and where do I learn it?

Yes, and The Complete Excel Course with AI Integration from Coding Liquids builds the whole routine around SalesFusion, an industry-standard data project whose design came out of conversations with people across many different industries, and whose raw files look like what a store pulls out of its systems: CSV sales exports with symbols inside the amounts, codes in mixed case, broken dates, product and region lookup files, period files gathered in one folder and a target grid with a heading per month. Give each channel a query of its own that renames its headers and cleans its rows, as Lesson 156 to Lesson 159 do for one sales file, stack the queries with Append into a single table (Lesson 165), and join product details to every line through a merge (Lesson 163). The 17 lessons picked here take 1 hour 36 minutes, and after them a refresh does the stitching that used to fill a morning.

Each marketplace names its columns its own way: can Power Query line the headers up before the exports are stacked?

Each channel's query renames them, and The Complete Excel Course with AI Integration teaches the renaming and the stacking as separate steps. In Lesson 156 the imported file's headers are renamed one by one with a double-click, in a style with no spaces (SaleDate, ProductID, SalesAmount), and every rename is recorded in Applied Steps, so it repeats on each later file. Lesson 165 then stacks two queries with Append Queries as New, which pairs columns up by name: a column called Order Total in one export and Amount in another would land as two half-empty columns, which is why the names are set first. Append as New also leaves both source queries untouched, so a fault in the stacked table can be traced to the channel it came from. Give your site export and each marketplace report a query of its own, rename to one set of headers, and the stack lines up.

Refunds show up in my exports as negative lines: can the query mark returns and big orders as it loads them?

Yes: business rules belong inside the query, and The Complete Excel Course with AI Integration writes four of them in Lesson 160. A custom column works out Profit as sales minus cost; Margin divides profit by sales and returns null where sales are empty or zero, so no row ever shows a division error; a conditional column labels each line High or Normal at a set value; and IsReturn marks any line with a negative amount as a Return and everything else as a Sale. That last rule fits store exports well, since refunds usually arrive as negative lines beside the sales. Because the rules live in the query, they run the same way at every refresh, and no two reports built on the table can disagree about what counts as a return or a big order. Set the High threshold to your own idea of a big basket.

One channel exports discounts as whole numbers and another as fractions: can the query put them on one scale?

Yes, with one custom column that The Complete Excel Course with AI Integration writes in Lesson 158. The lesson's discount column arrives in a state any marketplace seller will recognise: percentage signs and hyphens mixed in, and some rates typed as whole numbers, 15 meaning 15%. Replace Values clears the signs and hyphens, the column becomes a decimal number, and a custom column called DiscountRate, written as a short M formula, divides any value above 1 by 100, so 15 and its fractional form end up identical. The same lesson turns quantities spelled out in words into real numbers before setting Whole Number, since nobody sells half a unit. Lesson 167 applies the DiscountRate rule across a whole folder of files, so every channel's rates share one scale however each one types them, and a report on discounting finally compares like with like.

Some orders never reach a marketplace payout: can a query list them for me?

Yes: merge the orders with the payout file on order ID, keep every order, and look for the ones the payout side leaves empty, a method The Complete Excel Course with AI Integration builds in pieces. Lesson 163 merges two queries with the Left Outer join kind, under which nothing from the first query is dropped and the second query contributes columns only where its key finds a partner. Run it from your order table to the payout file and an order nobody paid out shows empty payout columns. Lesson 168 adds the closing habit: after each merge, filter the new columns for nulls before anything is totalled, and here those nulls are your list to chase. Lesson 164 also reads through the other join kinds, Full Outer and Inner among them. The lessons join sales to product and region tables; matching part payments or fees spread over several lines is not taught, while a clean match on order ID runs at every refresh.

Can the query bring each SKU's cost from the supplier's cost sheet onto every order line and work out the margin?

Yes: a cost file merged on SKU gives every order line its cost, and The Complete Excel Course with AI Integration builds the same join in Lesson 163, where a product lookup file with a unit cost column is merged into the sales query on ProductID. Swap in your supplier's cost sheet, keyed by SKU, and each line gains its cost at the next refresh, with no lookup formula copied down a sheet. From there, custom columns written the way Lesson 160 writes Profit and Margin work out what every line earned, the margin left empty rather than erroring where a line has no sales. Two habits from Lesson 168 protect the figures: Profit is typed as a decimal number, because a whole number type would round it without warning, and a SKU the cost sheet does not hold yet shows up as an empty cost to fill before any margin goes out.

Before the weekly figures go to the founder, how can I prove the query has read every order?

Build a check query beside the data, as The Complete Excel Course with AI Integration does in Lesson 161. The main query is renamed and a Reference query made from it, so the check always reads the latest state of the data; Group By, in its advanced mode, then groups by YearMonth and RegionCode and returns two figures for each pair, TotalSales and RowCount, sorted with the biggest first and filtered to drop empty months. Hold those figures against the sales summary your platform or marketplace shows for the same months: when the totals and counts agree, the query has read every order. The sort earns its place too, since one region far ahead of the rest usually means a typing error in the source rather than a record month, and empty months point to dates the source wrote in a form Power Query could not read.

Settlement files land in one folder every week: once Power Query combines them, can I still tell which file a row came from?

Yes: the folder query writes each file's name beside its rows, and The Complete Excel Course with AI Integration shows it in Lesson 166. Get Data From Folder with Combine and Transform Data stacks the folder's files into a single table and writes a Source.Name column beside them, so a row from one week's settlement file or one marketplace's export still says where it came from after the stack. The same lesson switches column profiling from the first thousand rows to the entire data set and turns on column quality, distribution and profile in the View tab, so a file that brings blanks or errors shows up at once. Cleaning steps added in Transform Sample File apply to every file, present and future. Once the model is final, Lesson 168 removes Source.Name with Choose Columns, since a column kept only for tracing adds weight as the data grows.

My order history is too long to scroll comfortably: where should the cleaned table load so the workbook stays quick?

Keep every staging and check query as a connection and let only the finished table reach a worksheet or the data model, the rule The Complete Excel Course with AI Integration teaches in Lesson 162. Close and Load first writes each query to a sheet, which is how a workbook fills up with copies nobody needs; Load To then offers three choices, a table on a sheet, a connection only or the Data Model, and the lesson sets the staging and check queries to connection only and deletes their sheets. A connection-only query stays ready for a PivotTable or for the data model without a row of it in the grid. SalesFusion's finished order table, the Main Sales File of Lesson 168, is held the same way, as a connection. For a store with years of order lines, that is the difference between a workbook that opens and scrolls quickly and one that drags every time it is opened.

What makes a store's queries break, and does the course show how to get them running again?

A handful of things, and The Complete Excel Course with AI Integration shows the way out of each. Move a source file and the query loses it, so Lesson 153 keeps every file in the project folder. A step can fail on a new file; Lesson 167 clears such an error by deleting the step that caused it, the fix for most Power Query errors. Power Query reads capitals strictly, so North and NORTH would be two regions until Lesson 157 puts the codes in one case, and its Replace Errors catches only true errors, never a cell holding the word error, which needs Replace Values. A whole number type would round profit without a word, so Lesson 168 sets it as a decimal, and merges can let in nulls, which the same lesson checks for. Clicking back up the Applied Steps list, as Lesson 159 does, shows where a fault came in.

The planning sheet gives every month its own column of sales targets: can Power Query reshape it so the targets sit beside actual orders?

Yes: Unpivot reshapes it, and The Complete Excel Course with AI Integration works through such a file in Lesson 173, a budget export that gives each month its own heading after columns for region code, category and metric. With the descriptive columns selected, Unpivot Other Columns moves every month heading down into a YearMonth column and its figures into an Amount column beside it, and because the step names the columns it keeps rather than the months, a heading added next month comes through untouched. A custom column then turns each YearMonth into a real date, Pivot Column splits the metric column into its two measures, budget and target, and Group By totals both by month start. Set out as rows of month and figure, your channel or category targets line up with actual orders month by month, ready for a PivotTable or SUMIFS to compare.

This year's peak season sits in one export and last year's in another: can Power Query put them on one timeline?

Yes: copy one pipeline onto the other year's file, then stack the two, and The Complete Excel Course with AI Integration teaches both moves. In Lesson 164 a finished staging query is copied with Duplicate and only its Source step changes, through the gear icon, to the other year's file; every saved step, from renames to data types, runs on the new file at once. The lesson still audits the result, since the new file brings empty dates of its own. Lesson 165 then uses Append Queries as New to put both years in one query, and scrolls the date filter from one year's dates into the next to confirm the stack. With both seasons on one timeline, a PivotTable sets this peak against last year's month by month, and each new season repeats the same two moves.

Is Power Query point-and-click, or will I be writing M code to clean my order data?

Point-and-click, with a few short formulas typed in, and The Complete Excel Course with AI Integration keeps it that way. The editor's ribbon does the work: Remove, Rename, Trim, UPPERCASE, Replace Values, Data Type, Group By, Merge, Append and Unpivot are all chosen from menus, and each choice lands in Applied Steps as a named step you can inspect or delete. The typing is short and readable: a Profit custom column of sales minus cost (Lesson 160), a DiscountRate column written as a small M formula (Lesson 158), a month label from Date.ToText (Lesson 159). Hand-writing a query in M from scratch is not taught, and a store's weekly routine never calls for it. One habit from Lesson 156 saves trouble later: headers without spaces, since spaces force extra brackets in M and in DAX.

Is Power Query something to download or buy before my store's exports can go through it?

Power Query ships inside Excel, so your exports can go through it today, and The Complete Excel Course with AI Integration opens it in Lesson 155 from the Data tab, through Get Data, From File and From Text/CSV. The same menu lists the other file types it reads, CSV, JSON, XML and PDF among them (Lesson 154), and Transform Data opens the Power Query Editor with its Transform, Add Column and View tabs. The course asks for Windows only where Power Pivot or Power Automate comes in, and neither tool appears in the lessons here. Windows enters at the step after, when SalesFusion relates the cleaned tables in its data model and writes DAX measures (Lesson 169 and Lesson 170). Everything the weekly stitching of channel exports asks of Power Query, from importing the first CSV to reshaping the target grid, is on this page.

Excel with AI

See the whole course.

The Complete Excel Course with AI Integration: 16 hours of video in 186 lessons, built around 14 industry-standard projects, with lifetime access, a Certificate of Completion and a 14-day money-back guarantee.