The Complete Excel Course with AI Integration

Power Query for sales teams

Every week the same sales exports arrive: orders from the CRM, a file per period, a product list, a grid of targets, and someone spends hours making them agree before a report exists. The Complete Excel Course with AI Integration hands that routine to Power Query on SalesFusion, an industry-standard project built on sales data. This page picks out the lessons that do it: cleaning, period columns, sales rules, control totals, merges, a 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:

  • Bring a CRM or order export into Power Query through Get Data and keep the raw file untouched while the query does the cleaning.
  • Trim region codes and product IDs and set them in one case, strip money symbols, commas and NA out of amount columns, and turn quantities typed as words into whole numbers.
  • Give every order its year, month name, month number, month start and year-month inside the query, so sales report by period and months sort in calendar order.
  • Add Profit, a Margin that never divides by zero, a High or Normal band for order size and a Return or Sale label to each order, and remove duplicate order IDs.
  • Prove an export before it is reported with a Group By query of total sales and row count by month and region, biggest totals first.
  • Bring product and region names in beside every order with a left outer join, and catch the orders whose codes find no match.
  • Combine every period file in a folder into one sales table that takes in next week's export on refresh, with last year's history appended to it.
  • Unpivot a target sheet with a column per month into rows of month, budget sales and target units.

Projects

What you will build.

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

  • Project 12

    SalesFusion

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

    Its Power Query half is a sales operations week in miniature: order exports with symbols and words where figures belong, product and region code lists to merge, a second year to stack, a folder of period files and a target grid with a column per month, each turned into a clean table that can be proved.

  • Project 05

    SalesPlusPerformance

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

    Where a clean query earns its keep: net sales by category, region and month in PivotTables with the dates grouped for you, slicers to narrow them, and Refresh All (Lesson 65), one button for every PivotTable in the workbook.

  • Project 11

    FormatWizard

    One click that checks a whole sheet for you.

    The check for sheets that people type rather than systems export: VBA that flags a missing region or salesperson and any entry in a number column that is not a number, the partner to a query that cleans what the CRM produces.

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 once sorting, filtering and a first PivotTable are behind you: SalesFusion then moves from one messy order export to a whole folder of them. Still finding your feet with tables? Pick up Lesson 19 for Excel tables and Lesson 57 for PivotTables on order data before you start, and if Excel is new altogether, open the course at Lesson 1. Already importing CSVs through Get Data? Skip ahead to Lesson 160, where the sales rules, control totals, merges and folder work 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 Where the report is heading and how the data gets in: the finished SalesFusion report, where filtering one product category updates the detail sheet by itself, the ETL idea of steps recorded once and replayed on every new file, and a messy sales CSV opened with Transform Data rather than dumped onto a sheet.
  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 An order export made fit to report: unneeded columns removed and the rest renamed without spaces, region codes and product IDs trimmed and set in capitals, money symbols, commas and NA cleared from the amounts, quantities typed as words turned into whole numbers, discounts put on one scale, and every sale given its year, month and year-month.
  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 Sales rules and proof inside the query: Profit, a Margin that never divides by zero, a High or Normal band for order size and a Return or Sale label, duplicate order IDs removed, then a Group By of total sales and row count by month and region, and Close and Load choices that keep staging queries out of the grid.
  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 The combining work: product and region names merged in beside every order with a left outer join, a whole pipeline repointed at the next year's export, both years appended into one table, every period file in a folder combined so next week's joins on refresh, and one master sales table checked for blanks.
  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 target sheets: a wide export of budget sales and target units with a column per month turned into a long table by month, which keeps working when new month columns are added.
  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.

Sales exports rebuilt by copy and paste every week: is Power Query the way out?

Yes, and The Complete Excel Course with AI Integration from Coding Liquids teaches it on the very data sales teams handle. SalesFusion, an industry-standard project designed after talking with people from many different industries, starts from messy CSV exports of sales orders, code lists for products and regions, a folder of period files and a grid of monthly targets. Power Query records each clean-up step once and replays it on every new file, so the routine of pasting, trimming, fixing and stacking becomes one refresh. You clean an export (Lesson 157 to Lesson 159), add sales rules such as profit, margin and returns (Lesson 160), merge in product and region names (Lesson 163) and combine a whole folder (Lesson 166), building every query yourself with the finished workbook to compare. The 17 lessons picked out here, 1 hour 36 minutes of video, turn a weekly chore into a report that rebuilds itself.

Can Power Query pull straight from our CRM, or does it need an export first?

An export is all it needs, and The Complete Excel Course with AI Integration builds the whole method on exported files, the form almost every CRM can produce. Get Data opens the door to CSV, JSON, XML, PDF and more (Lesson 154); the lessons take the CSV route and choose Transform Data, so the file lands in the Power Query Editor instead of on a sheet (Lesson 155). From then on the export is only read, never edited, so it stays exactly as the CRM produced it. The strongest set-up for a sales team is a shared folder that each new export is saved into: Lesson 166 points one query at the folder and stacks every file inside it. Connecting to a CRM's own database has no lesson; for the reports a sales team runs each week, a regular export saved into one folder gives the query everything it needs.

Sales ops saves a new export into a shared folder every Monday: will the report pick it up without anyone editing the query?

Yes: that is the job Lesson 166 of The Complete Excel Course with AI Integration sets up. Get Data From Folder takes a whole folder of sales period files, and Combine and Transform Data stacks them into one table with a Source.Name column naming the file each row came from, so a bad week can be traced to its file. The cleaning steps go on the sample file once, the renames, trimming, capitals, replaced values and data types, and apply to every file in the folder, today's and next Monday's. A new export saved there joins on the next refresh. Two practical habits come with it: column profiling is switched from the first thousand rows to the entire data set, so the quality checks see every order, and every source file stays in the project folder, since a moved file breaks the connection (Lesson 153). The exports need a shared layout, which one CRM normally gives.

Our CRM spells regions and product codes three different ways: can Power Query make them agree for good?

Yes, and once the fix is a step of the query it holds for every export that follows. In The Complete Excel Course with AI Integration, Lesson 157 trims stray spaces from the region codes and product IDs and sets them in capitals, strips hyphens out of the product IDs with Replace Values, and clears the word error typed into cells, which Replace Errors would miss because it is text, not a real error. The same lesson carries a warning sales teams need: Power Query is case-sensitive, so North and NORTH count as two regions until one case is set, even though a PivotTable would have grouped them. The lessons work on codes; rep names and pipeline stage labels take the same Trim, case and Replace Values steps. Headers renamed without spaces (Lesson 156) and duplicate order IDs removed (Lesson 160) finish the job, so each product and region lands on one row of the report, not three.

Revenue in our report comes out short even though every order is there: can Power Query find out why?

Yes, and the usual cause is one The Complete Excel Course with AI Integration meets head on: figures held as text. A sales export with money symbols, commas or NA inside its amount columns imports as text, and text cannot be summed or averaged, so a report built on it looks complete and calculates wrong (Lesson 158). The lesson converts the amounts to decimal numbers, replaces quantities written as words before typing them as whole numbers, and strips percent signs from the discounts. Discounts keyed two ways, 15 meaning 15 per cent beside proper fractions, get one rule in a DiscountRate column that divides anything above one by 100. The fault surfaces again later, in the Power Pivot lessons that need Windows, when a DAX measure fails and Check Formula traces it to an amount column stored as text, fixed back in Power Query (Lesson 170). Once types are set in the query, every SUMIFS, PivotTable and measure downstream reads real numbers.

Can Power Query put the product name, category and cost beside every order from our product list?

Yes: a merge is Power Query's version of VLOOKUP, done once for the whole table, and The Complete Excel Course with AI Integration teaches it on a sales query and two code lists. In Lesson 163 the orders are merged with the product list on ProductID and with the region list on RegionCode, using a left outer join that keeps every sale and fills in details only where a code matches, so no order is ever dropped. Lesson 168 repeats the merges on the folder data and then checks for blanks, the step that catches a product code the list does not know yet, such as an item launched this month, before its sales vanish from a category total. In sales terms the same move joins a quota list to reps or a customer list to accounts, whichever list the CRM can export, and the join reaches every row of every future file at a refresh.

One region suddenly looks far stronger than the rest: can Power Query show whether it is a keying error?

Yes, and the check is built before any report exists. In Lesson 161 of The Complete Excel Course with AI Integration, a reference query groups the cleaned sales by year-month and region code, totalling the sales and counting the rows, then sorts the totals biggest first. A figure that looks too good stands out at the top, and the lesson's own example is one every sales manager has met: a region apparently outselling the whole planet is usually a typo. The row count shows whether a surge is many orders or one huge entry, and a blank month points to dates the raw file could not read. Because it is a reference query, it stays wired to its source and reruns with every refresh. Kept as a connection rather than a sheet (Lesson 162), it waits in the background until the day a number needs explaining.

Can the query mark returns, flag big orders and work out margin before the report sees them?

Yes, all three, as columns of the query itself, which The Complete Excel Course with AI Integration builds in Lesson 160. Profit is sales less cost; Margin divides profit by sales and returns null when sales are blank or zero, so a zero-value line never throws an error; a conditional column called HighValue marks an order of 500 or more High and the rest Normal; and IsReturn reads Return wherever the amount is negative and Sale everywhere else. The lesson then removes duplicate order IDs, so a deal exported twice is counted once. Built in the query, these rules run identically on every refresh, which ends the meeting where two reports show two margins for the same month. Lesson 167 applies the same columns to every file in the folder and adds fiscal year columns for teams whose sales year does not start in January.

Can the report set this year's sales beside last year's, month by month?

Yes, and The Complete Excel Course with AI Integration gets both years into one clean table without building anything twice. The trick in Lesson 164 is that a finished query can be duplicated and pointed at a new file by changing only its Source step: the second year's sales export inherits every trim, type and rule, receives the same product and region merges, and is still audited, since it arrives with blank sale dates of its own. Lesson 165 stacks the two years with Append Queries as New into one query, SalesAllFinal, which works because the headers match, and the sale dates are scrolled from one year into the next to prove the stack. Months then sort January to December thanks to the month number added in Lesson 159, and a PivotTable grouped by date shows each month against the same month a year earlier (Lesson 61). Every new sales year costs one copy and one append.

Monthly targets come in a wide sheet with one column per month: can Power Query set them against actual sales?

Yes: Unpivot turns that sheet into the long shape a comparison needs, and The Complete Excel Course with AI Integration practises on exactly that kind of file. Lesson 173 opens a wide export of budget sales and target units by region code and category, with a column for every month. Unpivot Other Columns keeps the descriptive columns fixed and turns the months into rows of year-month and amount; because the step names no month, a new month column added next quarter cannot break it. A MonthStart column turns the text month into a real date, the metric column is pivoted back into Budget Sales and Target Units, and Group By totals both by month. In that shape the targets line up with actual sales month by month, ready for SUMIFS or for a data model (Lesson 169, on Windows). Retyping a target grid becomes one query that keeps up with every reforecast.

What are the drawbacks of Power Query for a sales team, and how do the lessons deal with them?

A handful, and The Complete Excel Course with AI Integration meets each one in the lessons, so none catches you out on a live report. Power Query is case-sensitive, so North and NORTH are two regions until one case is set (Lesson 157). Its queries find their files by location, so sources stay in one project folder (Lesson 153). An append matches columns by header (Lesson 165) and a folder query expects one layout, so a renamed export column needs attention. Loading every staging query to a sheet bloats a workbook, which is why only the final table is loaded (Lesson 162). An error after an edit usually vanishes once the step that caused it is deleted (Lesson 167). And a report is only as fresh as its last refresh. Set against a weekly afternoon of copying and pasting, each of these is a small cost for a report that rebuilds itself.

Our sales analyst cleans the export with a VBA macro: should Power Query take over?

For a system export that comes back every week, yes, and The Complete Excel Course with AI Integration teaches both tools so the work can be split properly. A query keeps every step in Applied Steps, visible and named (Lesson 156), reads the source without overwriting it and runs the same at each refresh, so nobody needs to read code to see what happened to the data. VBA earns its place on sheets people type into: FormatWizard, the course's macro project, runs on a sales sheet and flags a missing region or salesperson, colours the cells at fault and marks an entry in a number column that is not a number (Lesson 148 to Lesson 150). Plenty of sales teams need both, Power Query to bring the CRM export in clean and a macro to check what people key by hand, and the course leaves you able to build and maintain either.

Half the sales floor works on Macs: can everyone follow these lessons without buying anything?

Yes. Every lesson on this page works in the Excel your team already runs: Power Query sits on the Data tab as Get Data, part of Excel itself, with no add-in to install and nothing extra to license. Mac users are covered too, because the only tools the course lists as needing Windows are Power Pivot and Power Automate, and the path here stops before either. The order of The Complete Excel Course with AI Integration also settles the DAX or Power Query question sales analysts argue about: Power Query cleans and shapes the data, DAX measures it, and SalesFusion teaches them in that sequence. The measures follow from Lesson 169, where the clean tables become a Power Pivot data model with total sales, margin percent and share of total, and those lessons need a Windows PC, so a mixed team can hand the model to whoever has one.

How soon does Power Query take the weekly sales report off my hands, and what do I keep?

About 1 hour 36 minutes of video, and it starts paying back long before the last lesson. By Lesson 159 of The Complete Excel Course with AI Integration a raw order export has been imported, cleaned, typed and given its period columns: repeat that on your own CRM file and Monday's clean-up shrinks to a refresh. Rules and a control total come next, then merges and appends, and at Lesson 166 the whole folder of period files becomes a single query. What stays with you: the SalesFusion dataset of messy CSVs and code lists, each query you built, and the completed workbook for comparison, with lifetime access for whatever new export the CRM produces next. Completing the course adds a Certificate of Completion with a verification link, and a set of refreshing sales queries of your own to open and explain in an interview.

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.