The Complete Excel Course with AI Integration

Power Query for merchandise planners

Every Monday a planner pastes the same exports together: store sales, stock, the intake plan and a grid with a week per column. The Complete Excel Course with AI Integration gives that chore to Power Query in SalesFusion, its industry-standard project for messy files. The lessons chosen here follow a planner's week: one export cleaned, markdown rates on one scale, sales brought to stock's level, store files stacked from a folder, seasons appended, the plan grid unpivoted.

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:

  • Bring a weekly sales or stock CSV into Power Query through Get Data and clean it once: codes trimmed and in capitals, symbols and NA cleared from the figures, true numbers and dates.
  • Put markdown rates typed two ways, as 30 and as 30%, onto one scale with a custom column, then band them with a conditional column.
  • Mark returns apart from sales, remove transactions exported twice and work out margin inside the query, so every refresh applies the same rules.
  • Summarise till-level sales with Group By to the level of the stock file, then join the two with a left outer merge on their shared codes.
  • Stack every store's weekly file from one folder into a single table, and append last season's history for like-for-like comparisons.
  • Move a finished pipeline onto next season's export by changing its Source step, then rebuild the merges on the new query.
  • Turn a plan laid out week by week across the columns into long rows of period and figure, the shape a PivotTable or a SUMIFS reads without fuss.
  • Hold the staging queries back as connections and send just the end result to a sheet, so a season of till data never weighs the planning workbook down.

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.

    Built as a reporting system for messy sales exports, it gives a planner every Monday task in one place: period files to stack, codes and figures to clean, lookup files to join, two years to line up and a budget laid out by month to turn into rows.

  • Project 05

    SalesPlusPerformance

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

    Built on order-level sales, it is where a clean query's output gets read in a trading review: category totals, dates grouped into months, slicers to narrow by store, and Refresh All, which brings queries and pivots up to date in one press.

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

Begin at Lesson 153: SalesFusion's first lessons show the finished report and open the first export, and from there the path moves the way a planner's week does, one file, then a folder, then the plan grid. It assumes you can already build a PivotTable from a table; if not, Lesson 57 gets you there first, and someone opening Excel for the very first time starts the course at Lesson 1. Planners who already import and tidy files in Power Query can skip ahead to Lesson 160, where the planning rules, the merges and the stacking of whole folders 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 The plan for a weekly pipeline: SalesFusion's finished report as the goal, Extract, Transform and Load as steps recorded once and replayed on each new file, and a CSV opened from Get Data with Transform Data picked instead of Load, so the export is read and never pasted. A planner's sales or stock export comes in by the same route.
  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 Cleaning that sticks: temporary columns dropped and headers renamed without spaces, codes trimmed and put in capitals, symbols, commas and NA stripped out of the money columns, quantities typed as words corrected, each column given its proper type, and dates split into year, month name, month number and month start. The lessons clean sales exports; style and store codes take identical treatment.
  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 Planning rules inside the query: profit and margin as custom columns, a conditional column that sorts each sale into a band, returns labelled apart from sales and repeated orders removed, then a Group By check that totals the sales and counts the rows per month and region, and Close and Load set so staging queries stay off the sheets.
  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 6 of 21 lessons · 35 min Joining and stacking the week's files: merges that put product and region details beside every sale, the left outer kind that loses no sale; the cleaning pipeline pointed at a second year's export, its merges built again; both years stacked into one query; a whole folder of store or period exports combined and cleaned alike, with columns for profit and the fiscal year; and one master table assembled from history and lookups, nulls checked after each join.
  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
  4. 166 From Folder in Power Query Combine every sales file in a folder automatically 9 min
  5. 167 From Folder automation in Power Query Profit metrics and fiscal year columns 7 min
  6. 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 for a plan laid out across the columns: a wide budget export holding one column for each month becomes long rows of period and figure, a true month-start date is built from the text, and the measures are pivoted back into their own columns. A planner's grid with a week per column takes the same steps.
  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.

Power Query for merchandise planners: which planning jobs belong in a query, and which stay on the sheet?

The repeatable file work belongs in a query and the planning judgement stays on the sheet, and The Complete Excel Course with AI Integration from Coding Liquids puts the query half in your hands through its SalesFusion project, which is industry standard and was designed after talking with people from many different industries. In the query: each week's store files stacked from a folder (Lesson 166), codes, figures and dates cleaned the same way every time (Lesson 157 to Lesson 159), product and region details joined to each sale (Lesson 163), returns and margins worked out (Lesson 160), and a plan grid laid out period by period across the columns turned into rows (Lesson 173). On the sheet: cover, sell-through and the open-to-buy, read from that one clean table, and the decisions about what to chase, move or mark down. The lessons run on sales CSV files, close cousins of a planner's exports, and the query half takes 1 hour 36 minutes over 17 lessons.

Our range plan has a column for every week of the season and a row per class: why would Power Query turn it on its side?

Because a long table is the shape every report reads, and The Complete Excel Course with AI Integration teaches the turn in Lesson 173. The lesson's export is a budget file in which every month has a column of its own. With the descriptive columns selected, Unpivot Other Columns holds them in place and swings the month columns down into two, the period and its figure; then a real month-start date is built from the text, so the periods sort and calculate as dates. Because the step names no month, a column added for a new period is taken in at the next refresh instead of breaking the query. The lesson ends by pivoting the metric column back out into a column per measure and grouping by month. A planner's grid with a week per column goes through the same steps, and in that long form the plan lines up beside actual sales period by period in a PivotTable or a SUMIFS, ready for a plan-against-actual view.

Sales arrive as one row per sale, but the stock file holds one row per line per store: can Power Query bring them to the same level before they meet?

Yes: Group By summarises one side, a merge joins the two, and The Complete Excel Course with AI Integration teaches both on SalesFusion. Lesson 161 groups the sales by month and region in a query of its own, summing them and counting the rows behind each total, with the biggest sorted to the top so a figure that looks too good stands out; the same tool summarises a planner's till lines by week, store and line, the level the stock file already holds. Lesson 163 then merges queries on a shared code, and the left outer kind of join it chooses holds on to all the sales rows while filling in the matching columns wherever a partner exists. Join the weekly sales summary to the stock snapshot on line and store, and each row carries units sold beside units on hand, the raw material of cover and sell-through. The habit that keeps it honest comes from Lesson 168: after every merge, look for blanks in the new columns before any total is trusted.

Returns come through the sales export as negative lines, and some transactions appear twice: can the query keep sell-through honest?

Yes, and The Complete Excel Course with AI Integration builds both safeguards into SalesFusion's query in Lesson 160. A custom column marks every row with a negative sales amount as Return and the rest as Sale, so returns can be counted, filtered or kept out of a sell-through figure on purpose rather than quietly netted off. The same lesson removes duplicate rows on the order number, the step that stops one transaction exported twice from inflating the week, and adds profit and margin columns, with margin left empty where sales are zero instead of throwing an error. Each of these rules lives in the query, so it runs identically at every refresh and on every file the folder query brings in later (Lesson 167). For a planner that means one agreed definition of a sale across every report built on the table, whoever opens the workbook and whichever week they look at.

Our markdown percentages arrive as 30 in one store's file and 30% in another's: can the query put them on one scale and then band them?

Yes, both, and The Complete Excel Course with AI Integration teaches the two steps on SalesFusion's own Discount column. In Lesson 158 that column arrives with per cent signs, hyphens and figures typed both ways, so the signs are stripped, the column becomes a decimal number and a custom column, DiscountRate, divides anything above one by a hundred: 30 and 30% come out as the same rate. Lesson 167 repeats the rule inside the folder query, so every store's file gets it on arrival. Banding comes next: Lesson 160 adds a conditional column that labels each sale High or Normal against a threshold, and the same dialog takes several conditions, so full value, light markdown and deep markdown become a column the PivotTables can group by. The band edges are yours to set; the query applies them identically every week, which a column of hand-typed labels never manages.

Closed stores, test tills and staff sales clutter the export: can the query drop them before anything is reported?

Yes: a filter set in the query is a saved step, and The Complete Excel Course with AI Integration uses such steps throughout SalesFusion. Lesson 161 unticks the empty months in the year-month filter and keeps only the groups whose row count is above zero; Lesson 164 unticks the empty dates a new file brings with it. Untick the closed stores, the test tills or the staff-sale code in their column the same way, and the step removes them from every future refresh while the export itself stays whole. The lessons pair that power with a caution worth repeating to anyone who filters: check what a row holds before it goes, because a filter removes without a word. Rows dropped in the query never reach a PivotTable, a SUMIFS or the trading pack, so every report on the table agrees about which stores count, and nobody has to remember to leave them out by hand.

Orders, receipts and sales come as three separate exports: which should Power Query stack and which should it join?

Stack the exports whose columns match, join the ones linked by a code, and The Complete Excel Course with AI Integration draws that line plainly: merging adds columns side by side, appending stacks rows (Lesson 165). Weekly sales files from every store share one layout, so they are stacked, from a folder in one move (Lesson 166). Orders and receipts describe the same purchase order from two sides, so they are joined on the order number with a merge (Lesson 163); the left outer join keeps every order and shows blanks where nothing has been received yet, which is your open order book. Sales then meet that view through the line code, once summarised to the same level. Lesson 168 puts both moves in one place, merging the lookups and appending the history into a single master table, then checking it for nulls before it is loaded.

Next season's export arrives as a new file: do I rebuild every query from scratch?

One changed step does it, and The Complete Excel Course with AI Integration shows the move in Lesson 164. The finished staging query is duplicated, the gear beside its Source step is clicked and the new file chosen, and every saved cleaning step runs on the new season's rows. The lesson then audits rather than assumes: the new file brings nulls of its own in the date column, which are unticked, and the merges with the product and region tables are built again on a reference to the new query, because duplicating the cleaning query does not carry them over. Two habits from the project keep the pipeline portable: keep every source file in the same project folder, since moving one breaks its connection (Lesson 153), and repoint the Source step the same way if the shared drive ever moves. A season's worth of clean-up is then one step away from working on the next.

Like-for-like trading needs last season's weeks beside this season's: can the two exports become one table?

Yes: an append stacks them, and The Complete Excel Course with AI Integration teaches it in Lesson 165 on two years of cleaned sales. Append Queries as New puts the first year above the second in a fresh query, leaving both sources untouched so a fault in the combined table can be traced to its origin, and the lesson scrolls the date filter from one year into the next to prove the stack is whole. The rule to remember is the lesson's own: an append matches columns by their headers, so both seasons must name their columns alike, which the shared cleaning pipeline of Lesson 164 guarantees. With one timeline, a PivotTable sets this season beside last season by month, class or store, and the like-for-like line of the trading pack stops being a copy-and-paste job. Lesson 168 then joins the stacked history to the folder of current files in one master table.

A season of till data makes our planning workbook crawl: what does the course teach about keeping it fast?

Four habits, all of them practised inside SalesFusion in The Complete Excel Course with AI Integration. Remove the columns you will never report on first, because every later step then has less to carry (Lesson 156). Hold dates as Date rather than Date/Time, which drops the time, saves memory and keeps relationships cleaner (Lesson 159). Keep every staging and checking query as a connection only and let just the end product reach the workbook, on a sheet or in the Data Model the Power Pivot lessons build on (those need Excel for Windows): the course's golden rule for a workbook that stays quick (Lesson 162). And let the folder query do the stacking (Lesson 166) instead of pasting each week under the last. A planner's workbook usually slows because a season of raw rows sits in its sheets; after these lessons those rows live in a query, and the sheets hold only what the trading pack reads.

Could a colleague covering my holiday run Monday's refresh without knowing how the queries work?

Yes, and The Complete Excel Course with AI Integration builds the habits that make it possible. Each query in SalesFusion is renamed for what it does, a staging query and a QA query among them (Lesson 161), each step in its Applied Steps list can be renamed too (Lesson 156), and the Queries & Connections pane lists them all with a preview of their rows and the time of their last refresh (Lesson 162). Your cover drops the week's files into the agreed folder, presses Refresh All, and checks the QA query's totals and row counts by month and region against the figures you left them. Nothing is retyped and no formula is filled down, so there is little to get wrong. Leave a note of the folder's location and the totals to compare, and the Monday pack goes out on time while you are away, built exactly the way you would have built it.

One store renamed a column in its weekly file and the stacked table filled with blanks: would the course have caught that?

Yes: the append and folder lessons of The Complete Excel Course with AI Integration point straight at it. Lesson 165 states the rule behind the fault: an append matches columns by their headers, so a column renamed in one file arrives as a new, mostly empty column instead of joining its partner. Lesson 166 gives you the means to see it: column profiling switched to the entire data set, with Column quality and Column distribution on the View tab, shows at a glance how much of each column is empty or in error, and the file-name column says which file the stray rows came from. Lesson 168 then makes a check for nulls a fixed step after every merge and append. Because the folder query applies one set of steps to every file, a store's file that drifts from the agreed layout shows up the first week it happens, not when the season's figures refuse to agree.

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.