The Complete Excel Course with AI Integration

Power Query for quantity surveyors in Excel

Cost system exports, subcontractor schedules, tender returns set out every which way: a quantity surveyor's month starts with data that must be cleaned and joined before any report can be trusted. SalesFusion, the industry-standard Power Query project of The Complete Excel Course with AI Integration, trains you to do that once and replay it. Its lessons here run from importing a CSV through cleaning, merging and appending to stacking a whole folder and unpivoting a wide grid.

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 cost system's CSV export into Power Query through Get Data and clean it with recorded steps that replay on next month's file.
  • Turn tender returns laid out with a column per tenderer into a long list of item, tenderer and rate with Unpivot Other Columns.
  • Stack variation logs or monthly cost files into one table, matched by their column headers, with a column showing the file behind every line.
  • Give quantities, rates and amounts their proper types, keeping the decimals in quantities measured in square metres or tonnes.
  • Attach each cost line to its package with a left outer merge, after trimming the codes and setting them in one case, and catch every code that finds no match.
  • Total each month and package with Group By and a row count, so a mistyped figure stands out before it reaches a cost report.
  • Add year, month and period columns to every dated line, so costs fall into the right valuation and months sort in calendar order.
  • Find the step at fault when a refresh fails, and reuse a finished clean-up on a new project's exports by changing only its source.

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 on sales exports, SalesFusion is the course's Power Query project, and every step a quantity surveyor needs for a monthly cost export is in it: faulty figures cleaned, codes matched to lookup tables, two years stacked, a folder of files combined and a wide grid unpivoted.

  • Project 05

    SalesPlusPerformance

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

    An order-level sales report in the course, its PivotTables are where a cleaned cost export or an unpivoted tender list gets compared: trades down the side, tenderers or months across, slicers to choose a package.

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 cost reports already live in Excel tables: SalesFusion opens there with a dataset of raw CSV exports, and its lessons follow a monthly export from import to a combined, refreshable table. Tables and PivotTables still unfamiliar? Lesson 19 and Lesson 57 come first, and anyone opening Excel for the first time starts the course at Lesson 1. If the clean-up side is familiar from your own valuation files, jump to Lesson 163, where the merges begin, followed by appends and the folder of files.

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 method comes from: a finished report that refreshes from a folder of files as the goal, ETL explained as steps recorded once and replayed, and a raw CSV opened from Get Data, From Text/CSV, with Transform Data chosen rather than Load. The practice files are sales exports; a cost system's export enters the same way.
  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 A clean-up worth trusting: temporary columns dropped and headers renamed without spaces, codes trimmed and set in capitals, symbols, commas, NA and hyphens stripped from figure columns, the right type given to each column, and period columns built from the date. Applied Steps records each change for replay on the next file.
  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 Logic and checks before anything loads: profit and value-band columns written as custom and conditional columns, a grouped query that totals each region's month and counts its rows, then the Close and Load choice between a table on a sheet, a connection and the Data Model.
  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: lookup tables merged in through a left outer join, the cleaning pipeline repointed to the following year's file with its merges added again, two years appended by their headers, all the files in one folder stacked with each row labelled by its source file, the folder's sample file given the same cleaning plus profit and fiscal year columns, then a final fact 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 wide layouts: a grid holding one column for each month is reshaped into a long list, one row per item and period, and since the step names none of those columns, an extra one added later never breaks 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.

Cost system exports, subcontractor schedules and tender returns all arrive in their own layouts: can Power Query be the one place a quantity surveyor cleans and joins them?

Yes, and The Complete Excel Course with AI Integration from Coding Liquids trains you to make it exactly that, on SalesFusion, the course's industry-standard Power Query project designed after talking with people from many different industries. Every export is read from its file through Get Data, never retyped (Lesson 155); its clean-up is recorded as steps that replay on next month's file (Lesson 156 to Lesson 159); codes are matched to their names with a merge (Lesson 163); separate files are stacked into one table (Lesson 165 and Lesson 166); and a grid of one column per period becomes a list through Unpivot (Lesson 173). The raw files stay exactly as they arrived, so the source of every figure can still be opened. The practice data is sales exports; a cost ledger or a tender return goes through the same steps. Gathered here: 17 lessons, 1 hour 36 minutes in all, for a month that starts with clean data.

Tender returns arrive with one column per tenderer: can Power Query turn them into a list a PivotTable can compare?

Yes: Unpivot Other Columns does it, and The Complete Excel Course with AI Integration teaches the step in Lesson 173 on a budget export laid out month by month across the page. You select the columns that describe each row, item code, description, unit and quantity, and Unpivot Other Columns turns every remaining column into rows of attribute and value, here tenderer and rate. Because the step names only the columns you kept, a late return that adds another tenderer's column is unpivoted at the next refresh with nothing edited. The lesson renames the two new columns, clears n/a from the values and groups the result; for tenders, the long list then feeds a PivotTable with items down the side and tenderers across, or a SUMIFS total for each tenderer by trade. The same step reshapes any grid a QS receives, from a rate comparison to a schedule of monthly values.

Package managers keep variation logs with the columns in different orders: can Power Query stack them into one register?

Yes, because an append matches columns by their headers, not by their position, as Lesson 165 of The Complete Excel Course with AI Integration points out when it stacks two years of sales into one table. Order does not matter; names do. So the first job is to give every log the same headers, the renaming Lesson 156 teaches, after which variation number, description, status and value line up whatever order each manager used. Append as New leaves every source untouched, so a fault in the combined register can be traced to the log it came from. Where the logs sit in one folder as files of one layout, Lesson 166 combines them all at once, and the next log saved there joins at the following refresh. One register then answers for every package, rebuilt in seconds instead of an afternoon of pasting.

Once months of valuation files are combined into one table, can I still tell which file each line came from?

Yes: the folder query keeps a column for exactly that. When Lesson 166 of The Complete Excel Course with AI Integration stacks all the files kept in one folder, Power Query adds Source.Name, the name of the source file behind every row, so a figure in the combined table can always be traced to the valuation, application or export that supplied it. Lesson 168 treats the column with care: handy for checking and debugging, unneeded once the final table feeds a data model, so it is unticked there rather than carried for ever. For a quantity surveyor it is an audit trail in its own right: filter it to one month's file to see what that valuation contributed, or to find the file behind a line a client has queried. Nothing about it has to be built; it arrives with the combine.

Quantities measured in square metres or tonnes carry decimals: which type does Power Query need to keep them?

Decimal Number, and Lesson 158 of The Complete Excel Course with AI Integration shows why the choice matters. The lesson sets each column's type in turn: money columns become Decimal Number, words typed into the quantity column are replaced and the column becomes Whole Number, because nobody buys half a unit of the products in its data. A bill is different: a quantity such as twelve and a half square metres of screed needs Decimal Number, or the type rounds it without a word. Lesson 168 makes the same point from the other side, setting Profit to Decimal Number because a whole number type would round it silently. Choose each type by what the column measures, look at a few values after the step, and every total built on the column stays exact, valuation after valuation.

Can Power Query attach each cost line to its package from the code list, even when the codes were typed inconsistently?

Yes: clean the codes inside the query, then merge, the order The Complete Excel Course with AI Integration teaches. Power Query is case-sensitive, so a code in capitals and the same code in small letters are two different values to a merge; Lesson 157 trims every code and sets it in capitals before anything is matched. Lesson 163 then brings in the product and region tables, joined on their codes through a left outer merge, which retains each sales row and fills the looked-up columns wherever the codes agree. Lesson 168 adds the closing habit, a check for blanks after every merge, so a code the list does not know, a new package or a typing slip, is found before a total goes out short. The lessons match products and regions; your cost codes and packages join in exactly the same way.

Can Power Query make a mistyped figure in a cost export stand out before it reaches the cost report?

Yes: Group By finds it, and The Complete Excel Course with AI Integration builds the query in Lesson 161. A reference to the cleaned query is grouped by month and region, each group given its total and its count of rows, then sorted largest first, so a total that looks too good rises to the top; the lesson's own example is one region outselling the planet, which is usually a typo. The row count adds a second test: a package with one line where it normally has forty, or forty where it has one, points to a missing or duplicated file. Group your cost export by month and package the same way and read the top of the list before any figure goes into a report. Because the grouping is a reference to the main query, it reruns on every refresh.

A new project starts on the same cost system: do its exports need the cleaning built all over again?

The cleaning carries straight over: Lesson 164 of The Complete Excel Course with AI Integration copies a finished query with Duplicate and repoints the copy to another file. Every recorded step comes with it, and changing only the Source step, through the gear beside it, moves the whole clean-up onto the new export. The lesson attaches two cautions. The merges are added again on the new query rather than carried across, and the new file is audited before it is trusted, because it brings faults of its own, nulls in the date column among them. For a quantity surveyor opening a job on the same cost system, the trimming, typing and period columns of the last project are ready on day one, and the effort goes into checking the new data rather than repeating old work, which is exactly where a surveyor's attention belongs.

Can each cost line carry its valuation month, so the cost report groups and sorts periods correctly?

Yes: Power Query adds the period columns once, and they arrive on every line at each refresh. Lesson 159 of The Complete Excel Course with AI Integration first clears what would break the conversion, the n/a entries, a placeholder that is not a date and an impossible date, then sets the type to Date and adds Year, MonthName, MonthNumber, MonthStart and YearMonth. The month number matters more than it looks: without it Excel sorts month names alphabetically, and a cost report's year starts in the wrong place. Lesson 167 adds fiscal year columns in the folder query, which for a contractor can mark the financial year a cost belongs to. With MonthStart on every line, a PivotTable or a SUMIFS can total each valuation period exactly, and a late cost lands in the month it belongs to.

Next month's export breaks the refresh: how does the course teach me to find the step at fault?

By walking back through Applied Steps, the record of every change that The Complete Excel Course with AI Integration shows from Lesson 156 onwards: the steps are listed in order, and selecting any one returns the preview to the data as it was then, so the first step where the error appears is the one to fix. Lesson 167 adds a rule of thumb worth knowing, that most Power Query errors vanish once the step that caused them is deleted, and shows it on a Changed Type step. Lesson 164 warns that a new file brings its own problems, nulls in the date column among them, so a reused pipeline is audited rather than trusted. Lesson 157 supplies Replace Errors for genuine errors, and Replace Values for a cell that merely holds the word error.

A cost export arrives with empty lines and entries that have no date: can the query drop them every month?

Yes, with filters set once inside the query, which The Complete Excel Course with AI Integration applies wherever the data needs them. In Lesson 161 null months are unticked in the YearMonth filter, the lesson explaining that they come from unreadable dates in the raw file, and in Lesson 164 null dates are unticked again on the second year's file. Lesson 168 checks the final table after its merges and appends, unticking nulls in the amount and year columns. Each filter is a recorded step, so next month's export loses its empty and undated lines the moment it refreshes, and nobody deletes rows by hand. Look at what a filter removes before you trust it: a line with no date may be a real cost that needs a date, not rubbish to discard.

Our firm already runs a cost management system: does Power Query still earn a place in a QS's toolkit?

Yes, as the bridge between that system and the reports clients actually read. Most cost and accounts systems export to CSV, and Lesson 155 of The Complete Excel Course with AI Integration shows the way in: Get Data from Text/CSV, then Transform Data rather than Load, so the import becomes a repeatable pipeline instead of a one-time paste. From there Power Query reshapes the export into whatever your cost report, your tender analysis or a client's own format needs, which no system's standard report does for every client. Lesson 154 sets out the idea behind it, ETL: extract into one staging area, transform to one set of rules, load into Excel for the report. Specialist estimating and cost software is not taught; turning its exports into Excel reports that refresh themselves is, from start to finish.

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.