The Complete Excel Course with AI Integration

Power Pivot and DAX for quantity surveyors

A cost report is never one list: cost lines arrive by code, the code list names each trade and package, and valuations and variations sit in files of their own. The Complete Excel Course with AI Integration teaches Power Pivot and DAX through SalesFusion, one of its industry-standard projects, and the lessons gathered here relate such lists in one data model, measure them with DAX and set the results out as a report a project team filters for itself.

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:

  • Load cleaned cost lines and a cost code list into the Data Model and draw the relationship between them in Diagram View, so every line takes its trade and package from its code with no lookup column dragged down the sheet.
  • Work out each line's amount, quantity times rate, as a custom column in Power Query, and leave the totals and ratios to DAX measures that recalculate for any trade, package or month.
  • Write DAX measures for value to date, cost to date and margin, with a margin percentage built on DIVIDE that a cost value reconciliation reads package by package.
  • Give each trade or element its share of the project total with CALCULATE and ALL, a share that stays right whichever project or month a slicer picks.
  • Count variations, subcontract orders or payment applications once each with DISTINCTCOUNT, however many lines each one runs to, and divide the total by that count for an average size.
  • Check a cost export before anyone reads it: a Group By query of totals and row counts set against the ledger, and a search for blank codes after every merge and append.
  • Reshape a cash flow forecast or phased cost plan, laid out month by month across the page, into rows of month and amount for the data model with Unpivot.
  • Present the measures as a tabular PivotTable report by trade and as a dashboard of four PivotTables that one set of slicers filters together.

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, its second half is the model a cost report needs: one table of transactions related to two lookup tables, six DAX measures and four PivotTables moved by the same slicers. Put cost lines where the sales rows sit and a cost code list where the product list sits, and the same build reports value, cost and margin by trade and package.

  • Project 05

    SalesPlusPerformance

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

    Built on order-level sales data, it is where the PivotTable habits behind every report on the model come from: fields placed by dragging, dates grouped by month, slicers, report layouts and Refresh All, the skills a QS then uses on PivotTables drawn from the Data Model.

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 11 of them, 1 h 12 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 data already sits in Excel tables and you have built a PivotTable: the overview shows the finished report before a single table is loaded. New to PivotTables? The PivotTable lessons from Lesson 57 to Lesson 65 come first, and anyone new to Excel itself should open the course at Lesson 1. Already cleaning cost exports in Power Query? Your first relationship is drawn in Lesson 169, the first of the Power Pivot lessons that need Excel for Windows.

11 of 186 lessons · 1 h 12 min

15 SalesFusion: advanced data tools and a Power Query modelling system 1 of 21 lessons · 5 min The whole build seen first: messy files turned into a connected report that refreshes, with Power Query making the data usable and the data model making it useful. A monthly cost report fed by a ledger export and a code list follows the same plan.
  1. 153 Start here SalesFusion Power Query project Excel ETL pipeline and data model overview 5 min
15 SalesFusion: advanced data tools and a Power Query modelling system 1 of 21 lessons · 7 min Year, month name, month number and year-month columns made from a date inside the query, so a monthly cost report lists its months in calendar order instead of alphabetically.
  1. 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 Row-by-row logic in the query, where an amount from quantity times rate belongs; a Group By on month and region with a sum and a row count, the control figure to tie back to the ledger; and Close and Load set to connection only for staging queries, so the Data Model receives nothing but the finished table.
  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 1 of 21 lessons · 6 min The fact table assembled: lookups merged in, earlier files appended, every key column searched for blanks and the result kept as a connection, the state cost lines must reach before a relationship is drawn.
  1. 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 2 of 21 lessons · 16 min Power Pivot itself, for which Excel for Windows is required: three tables in the Data Model joined by one-to-many relationships in Diagram View, then DAX measures for totals, margin percent, share of total, distinct counts and averages. The lessons use sales rows; cost lines coded by trade take the same model.
  1. 169 Power Pivot Data Model in Excel Relationships and Diagram View 6 min
  2. 170 DAX measures in Power Pivot Total sales, margin percent and percent of total 10 min
15 SalesFusion: advanced data tools and a Power Query modelling system 2 of 21 lessons · 15 min The model put in front of readers: a tabular PivotTable report of the measures by category with the grand totals off, then a dashboard of four PivotTables from the Data Model that four slicers move together through Report Connections. The lessons report sales; the same layout gives cost by trade, project and month.
  1. 171 PivotTable report from the Data Model Format the SalesFusion report in Excel 5 min
  2. 172 Interactive Excel dashboard Data model PivotTables, slicers and styling 10 min
15 SalesFusion: advanced data tools and a Power Query modelling system 1 of 21 lessons · 8 min Unpivot for the month-by-month grids a QS is sent: a wide budget export folded into rows of month and figure, ready for the data model, and safe from the next month column because the step names no month.
  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.

Can a quantity surveyor relate bills, cost codes and valuations in Power Pivot and report on them with DAX, and where is that taught?

Yes. Power Pivot and DAX are part of The Complete Excel Course with AI Integration from Coding Liquids, taught through SalesFusion, one of its industry-standard projects, designed after talking with people from many different industries. The model it builds fits a QS's cost data closely: a long table of coded transactions, related to short lists that say what each code means. Cost lines by cost code, a list of trades and packages, a register of variations and the valuations behind a cost report all sit in that shape. Lesson 169 joins such tables through their codes, Lesson 170 writes the DAX measures that total, divide and count them, and the closing lessons turn those measures into a report and a dashboard that the whole project team can click through. The lessons work on sales exports, and the 11 lessons picked out here, 1 hour 12 minutes of video, lead from cleaned exports to that report, with the finished workbook beside yours for checking.

Each cost line carries a cost code, and the code list holds the trade, package and element: how does a relationship use that instead of lookup columns?

It joins the two tables once, through the code, and every line can then be reported by any column of the code list. In The Complete Excel Course with AI Integration, Lesson 169 loads a sales table and two lookup tables into the Data Model and drags each code onto its match in Diagram View: a one-to-many relationship, with the 1 marking the list where each code appears once and the asterisk marking the table where it repeats. In a cost model the cost lines are the many side and the code list is the one side, so trade, package and element never have to be copied down thousands of rows with XLOOKUP or VLOOKUP. Every column of the code list becomes a field for every PivotTable on the model, the file stays lighter, and a recoded trade is corrected in one place rather than in every row that uses it.

Quantity times rate for each bill item: does that belong in the query or in a DAX measure?

In the query, as a custom column, with the totalling left to DAX: that is the split The Complete Excel Course with AI Integration teaches. Lesson 160 builds row-by-row columns inside Power Query, profit as one amount minus another among them, and an amount from quantity times rate is the same kind of column, worked out once for each line and stored with it. Lesson 170 then writes measures that add such columns up and divide one total by another, recalculating for whatever trade, package or month the report shows. Ratios belong in measures: an average of line-by-line margins is not the margin of a package, while DIVIDE over two totals is, which is how the lesson writes Margin Percentage. DAX's own row-by-row functions such as SUMX are not part of the lessons; with the multiplication done in the query, a plain SUM measure returns the same total.

Value to date, cost to date, margin: which figures of a cost report could I write as DAX measures after these lessons?

The figures a monthly cost report leads with, because The Complete Excel Course with AI Integration builds the measures they rest on in Lesson 170. Total Sales is a SUM measure, and on cost lines the same measure gives value to date or cost to date. Total Profit, the sales amount less the cost amount, is the margin a contractor's cost value reconciliation reports. Margin Percentage divides one total by another with DIVIDE. Sales Percentage of Total by Category uses CALCULATE and ALL to set each group against the grand total, which on a cost report is each trade's or element's share. Orders counts distinct references with DISTINCTCOUNT, and an average per order divides the total by that count. On the way, the lesson traces a formula error to an amount column stored as text and fixes it at its source in Power Query, a fault exported cost columns often bring with them.

Can a measure keep each trade's share of the cost right whichever project or month a slicer picks?

Yes, with the measure The Complete Excel Course with AI Integration builds for each category's share of total sales. In Lesson 170 it divides a group's total by the grand total, using CALCULATE with ALL to set aside the category filter and reach the whole, and DIVIDE so that a zero never turns into an error. Point the same pattern at a trade, element or package column and every row of the report shows its percentage of the project cost, the layout of an elemental analysis or a cost plan summary. Because it is a measure, the share recalculates in whatever context a slicer sets: pick one project or one month and each percentage is of that project's or that month's total. Lesson 171 then sets such measures in a tabular report by category, with the grand totals switched off and the figures formatted to be read at a glance.

A variation runs to many lines in the register: can the model count variations, not lines?

Yes: DISTINCTCOUNT counts each reference once however many lines carry it, and The Complete Excel Course with AI Integration writes that measure in Lesson 170. The lesson's sales table holds a row per product, so one order appears several times; the Orders measure counts each order number once, and the average order value measure divides the total by that count. On a variations register the reference is the variation number: the count tells the project team how many variations stand in each trade or status, and the average shows the typical size of one, both correct for whatever a slicer picks. The same measure counts payment applications or subcontract orders that arrive as several lines each. A count of lines would overstate the number every time a variation is broken down into items, which is exactly how a register grows over a contract.

On the contractor's side, can the model report margin and margin percent package by package for the cost value reconciliation?

Yes: value, cost, margin and margin percent are measures The Complete Excel Course with AI Integration writes, and a package is simply the field you report them by. In Lesson 170, Total Sales, Total Profit and Margin Percentage sit on a table that carries a sales amount and a cost amount on every row, the same pairing a cost value reconciliation sets side by side. Margin Percentage uses DIVIDE, which returns a blank instead of an error when the value is zero, so a package with nothing valued yet does not fill the report with error codes. Lesson 171 lays the measures out in a tabular report with profit and margin first, the order the lesson picks because those are the figures people ask about first. Judging the forecast to complete stays your call; the arithmetic underneath comes out of the model the same way every month.

I report on several projects at once: can one model hold every project's cost lines and still show each one alone?

Yes, with one fact table that stacks them and a project field to slice by, both built in The Complete Excel Course with AI Integration. Lesson 168 appends the history of earlier files to the newest data and merges in the lookups, so one table holds every row; with a project column on each cost line, the same append gathers several schemes into one model. A slicer on that field then narrows every measure at once, and Lesson 172 ties each slicer to every PivotTable through Report Connections, so a single click turns the portfolio view into one project. Each trade's share, the margin and the distinct counts then answer for that project alone. The lessons stack two years of sales with the files of a whole folder; a portfolio exported from one cost system stacks the same way, because an append matches columns by their headers.

Our cash flow forecast comes as a grid with a column per month: can it go into the model?

Yes: Unpivot reshapes the grid into the long table a data model takes, and The Complete Excel Course with AI Integration teaches it in Lesson 173 on a budget export laid out month by month. The step is Unpivot Other Columns: the code and category columns stay put and the month columns fold down into two, the month and its amount, so a forecast issued again with extra months runs through the same query untouched. The lesson then turns each period into a real date and totals the figures by month, ending with a compact table ready for the model. That is the shape of a QS's cash flow forecast or a phased cost plan. Comparing the plan with spending so far is the budget against actual work FinanceGuard teaches from Lesson 115, budget and actual totalled by SUMIFS, then variance and percent variance on every row: a project outside this page's path and worth taking beside it.

Before the cost meeting, how do I know no cost lines were lost or counted twice on the way into the model?

With a control query that totals and counts the data the way the ledger does, which The Complete Excel Course with AI Integration builds before the model exists. Lesson 161 groups the cleaned rows by month and by region into a total and a row count, sorted biggest first, so an import that lost rows or doubled a figure shows at once against the system's own report. Lesson 168 adds the habit that follows every merge and append: filter each key column for blanks, because a code missing from the lookup list arrives empty, and an empty code is cost that belongs to no trade. When a measure fails, Lesson 170 shows the remedy: trace the error to its column, correct the type in Power Query and rebuild the measure. Tie the model's cost to date to the ledger once, and every refresh after that is checked the same way in moments.

Our team has no data specialist: will a model need constant upkeep once it is built?

Far less than the lookup chains it replaces, because The Complete Excel Course with AI Integration puts the upkeep inside steps that run by themselves. Every clean-up in SalesFusion is a recorded Power Query step, so next month's export is cleaned by the same steps at a refresh, and Lesson 162 keeps the working queries as connections, loading only the finished table into the Data Model so the workbook stays lean. The relationships drawn in Lesson 169 and the measures written in Lesson 170 are set once and stay. What needs a person is a new code with no partner in the lookup list, which the blank checks of Lesson 168 catch, and a change of layout in the export, which means editing a step, not rebuilding the model. One QS can own the model while the rest of the team only refreshes it and clicks the slicers.

Years of cost lines from a whole portfolio: will the model keep the workbook quick?

Quicker than lookup columns ever could, because The Complete Excel Course with AI Integration loads the model the lean way from the start. Lesson 162 sets the golden rule: only the finished table goes into the grid or the Data Model, while staging queries stay as connections, so the workbook never carries every step of the clean-up. Lesson 159 keeps dates as Date rather than Date/Time, which drops the time of day, saves memory and keeps relationships cleaner, and Lesson 168 takes out a column the report does not need before loading, since every unused column adds weight to a growing model. Once loaded, Lesson 169 relates the tables instead of filling names down every row, the job that slows a sheet of thousands of formulas. Feed each month's cost lines through the same queries and the model grows while the workbook stays responsive in the cost meeting.

Bills are quantity times rate and SUMIFS totals to me: how far is that from writing DAX?

Closer than it looks, and The Complete Excel Course with AI Integration assumes no coding at all. A DAX measure is a formula typed into a box in Power Pivot, and the first one in Lesson 170 is a SUM over a column, the same idea as the total at the foot of a bill page. The difference is where the conditions come from: SUMIFS names its criteria inside the formula, while a measure takes them from the PivotTable row and the slicers, so one cost measure serves every trade, package and month without a formula per cell. The new ideas arrive one at a time: DIVIDE for ratios, DISTINCTCOUNT for references, CALCULATE with ALL for a share of the whole. The same lesson uses Check Formula and Manage Measures to find and edit a measure that fails, and the finished SalesFusion workbook is there to set beside yours.

How soon could my own project's cost report run from a model, and what does my PC need?

About 1 hour 12 minutes of lessons, with the model itself taking shape in the second half. The Complete Excel Course with AI Integration spends the first lessons on this page getting data ready: dates the report can sort, row-level columns, a control total, the Close and Load choices and one checked fact table. Then come the Power Pivot lessons, Lesson 169 and Lesson 170, which need Excel for Windows, as the course's requirements say; the first of them opens Power Pivot through Manage Data Model on the Data tab. Build alongside on the SalesFusion files, then repeat the steps on one project's cost export and code list: that first model becomes the template for the next project. The lessons stay yours for life, ready for the next project's report, and the Certificate of Completion that comes with finishing the course carries a link an employer can use to verify it.

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.