The Complete Excel Course with AI Integration

Power Pivot and DAX for payroll administrators

Every period finance asks payroll the same things: cost by department, headcount, cost per head, overtime against gross pay, each answered with lookup columns down the register and more SUMIFS. The Complete Excel Course with AI Integration hands those answers to a Power Pivot model and DAX measures on SalesFusion, an industry-standard project. This page picks out the lessons that build it, from a folder of period files to a report finance filters with slicers.

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 the pay register, the employee master and a table of pay codes into the Data Model and relate them in Diagram View, so department and cost centre reach every pay line without a lookup column.
  • Write DAX measures for total gross pay, headcount with DISTINCTCOUNT and cost per head with DIVIDE that recalculate for whichever department, cost centre or pay month is chosen.
  • Show each department's share of the wage bill with CALCULATE and ALL, a percentage that stays correct under every slicer.
  • Stack each pay period's export from a folder into one fact table for the model, so the next period joins at Refresh All.
  • Prove the model's starting figures with a Group By query that totals and counts the pay lines by period and department, ready to tie to the payroll system's own summary.
  • Set out a payroll cost report from the Data Model in tabular form, with slicers for pay period, department and cost centre linked to every PivotTable through Report Connections.
  • Trace a measure that fails back to its cause with Check Formula, such as gross pay that arrived as text.

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.

    Built on sales exports, it walks the whole road a payroll report travels: period files stacked from a folder, a control total proved, a fact table related to its lookups and measured with DAX, then PivotTables and slicers on top. Put the pay register where its sales table sits and the employee master where its lookups sit, and every step carries across.

  • Project 05

    SalesPlusPerformance

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

    Built on order-level sales, it teaches PivotTables, grouping by date, slicers and Refresh All on a single table: the groundwork every Data Model report stands on, and a first payroll cost summary of your own before relationships and measures take over.

  • Project 06

    PeopleInsight HR workbook

    Employee data joined across sheets with one formula.

    Built on HR records, it joins employee details across sheets with VLOOKUP, XLOOKUP and INDEX MATCH, the formula route to each employee's department and cost centre. Learn it here and the model's single relationship shows at once how much filling down it spares.

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 10 of them, 1 h 8 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 you already total a register with PivotTables and SUMIFS: the lessons run in the order a payroll report is put together, from the period files to the slicers. Never built a PivotTable? The PivotTable lessons from Lesson 57 to Lesson 65 come first, and anyone new to Excel itself starts at Lesson 1. Already shaping exports in Power Query? Go straight to Lesson 169, where Power Pivot begins on Excel for Windows.

10 of 186 lessons · 1 h 8 min

15 SalesFusion: advanced data tools and a Power Query modelling system 1 of 21 lessons · 5 min Where the model is heading: the finished SalesFusion report, whose slicers drive a linked detail sheet, with Power Query introduced as the engine that replays a clean-up and the data model as the map of how tables relate. In payroll terms that map runs from the register to the employee master and the pay codes, and every source file belongs in one project folder from day one.
  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 2 of 21 lessons · 10 min Proof first, then loading: a Group By query totals the data by month and region and counts its rows, the control a payroll office ties to its system's run summary, and the Close and Load choices keep staging queries as connections while only the finished table goes on to the Data Model.
  1. 161 Group By in Power Query Summarise sales by month and region to validate data 5 min
  2. 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 · 22 min One table for every pay period: a folder query that combines each file in it, cleans every one with the same steps and takes in a new file at refresh, month and year fields and business columns rebuilt inside it, then the fact table merged with its lookups, appended to its history, checked for blanks and kept as a connection. The lessons use sales exports; pay period exports stack the same way.
  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 2 of 21 lessons · 16 min Power Pivot itself, on Excel for Windows as these lessons need: tables loaded to the Data Model and related in Diagram View, then DAX measures for totals, a distinct count, safe ratios with DIVIDE and a share of the total with CALCULATE and ALL. Read headcount for orders and gross pay for sales, and each measure has its payroll twin.
  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 report finance receives: a PivotTable from the Data Model set out in tabular form without grand totals, then a dashboard of PivotTables from the model whose slicers are each linked to every table, so one choice of month or department moves the whole page.
  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

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 Pivot and DAX for payroll administrators: how do headcount, cost per head and a department's share of the wage bill become measures, and where is that taught?

Each becomes a short DAX measure, written once and worked out afresh for whatever the report shows, and The Complete Excel Course with AI Integration from Coding Liquids teaches the pattern behind every one on SalesFusion, an industry-standard project designed after talking with people from many different industries. Its DAX lesson builds a total, a distinct count of order IDs, ratios with DIVIDE and a share of the total with CALCULATE and ALL; on a pay register those become gross pay, headcount, cost per head and each department's share. This page picks out the 10 lessons that lead there, 1 hour 8 minutes in all: period files stacked from a folder, totals proved against the source, relationships in place of lookup columns, then the measures and a report finance filters with slicers. The pay run itself stays in your payroll software, and the reporting around it moves into one model, so finance's next question becomes a slicer click.

Which payroll tables go into the model, and how are they related?

Three to begin with, joined the way The Complete Excel Course with AI Integration joins its own. In Lesson 169 SalesFusion loads a sales table and two lookup tables into the Data Model, then relates them in Diagram View by dragging a code column onto its match: two one-to-many relationships, the 1 on the lookup side where each code appears once, the asterisk on the sales side where it repeats. For payroll, the register takes the sales table's place, with many lines per employee each period. The employee master is one lookup, related on the employee ID and carrying department, cost centre and grade. A table of pay codes is the other, saying whether each code is basic pay, overtime, an allowance or a deduction. A timesheet export can later join the same master by the same drag.

Will relationships replace the lookups that copy department and cost centre onto every line of the register?

Yes, and the register stops carrying a copy of the employee master. A payroll register often holds lookup columns filled down thousands of lines just so a PivotTable can total by department or cost centre, and every new period means filling them again, each one adding weight to the file. The Complete Excel Course with AI Integration replaces them in Lesson 169 with one relationship from the register's employee ID to the master, made once in Diagram View, after which every field of the master is open to every PivotTable built from the Data Model. The lesson sets that relationship against a VLOOKUP dragged down thousands of rows, and the relationship wins. Lookup functions still earn their keep on the worksheet, and Lesson 69 teaches XLOOKUP on an HR dataset; for reporting across tables, a relationship does the work once.

An employee has a basic pay line, an overtime line and several deductions in one run: how does a measure count that person once?

With DISTINCTCOUNT, which The Complete Excel Course with AI Integration teaches on data shaped exactly like a pay register. In Lesson 170 the SalesFusion orders sit one row per product, so an order for three products fills three rows, and the Orders measure still counts each order ID once. Point the same measure at the employee ID column and you have headcount: one person, however many pay elements they received that period. Being a measure, the count follows the PivotTable and its slicers, so it reads correctly for one department, one cost centre or one pay month, while a plain count of rows would report pay lines instead of people. Headcount then becomes the bottom half of cost per head, worked out with DIVIDE in the same lesson.

Can a measure give the average cost per head without an error showing for a department with nobody paid?

Yes: DIVIDE handles the zero, and The Complete Excel Course with AI Integration uses it for every ratio in its model. Lesson 170 builds Margin Percentage and AOV, the average order value, by dividing one measure by another with DIVIDE, which returns a blank instead of an error when the figure underneath is zero. Payroll ratios share that shape: gross pay over headcount for cost per head, overtime over gross pay for the overtime share, deductions over gross pay for the share withheld. A cost centre with no one paid in the period simply shows nothing, so the report that reaches finance carries no column of error codes. Because a measure works each ratio out afresh from the totals of the rows in view, a department's figure is never an average of averages.

Can each department's share of the wage bill stay correct when the report is filtered?

Yes, with CALCULATE and ALL, the one new idea in the DAX that The Complete Excel Course with AI Integration teaches. Lesson 170 builds a percentage of total by category: DIVIDE sets each category's sales against a total that CALCULATE works out with ALL on the category, which lifts the category filter and reaches the grand total. Put department where category stands and the measure gives each department's share of gross pay, adding up to the whole however the rows are arranged. Because ALL lifts only the department filter, choosing one pay month in a slicer makes the shares those of that month's bill. Finance sees at a glance which teams carry the cost, with no total typed into a cell and no division done by hand.

Overtime flags on each pay line, cost per head for each team: where does each of them belong, the query or the model?

Each has its place, and The Complete Excel Course with AI Integration draws the line clearly. A figure that belongs to one line goes in the query: Lesson 160 adds Profit, Margin and a High or Normal band as custom and conditional columns, calculated the same way at every refresh. On a pay register that is a flag on overtime lines or a band for each line's amount. A figure that depends on how the report is cut goes in a measure: Lesson 170 builds totals, a distinct count and ratios that recalculate for every filter and slicer. Cost per head, headcount and a team's share all change with the month or department chosen, so no column could hold them. Line by line in the query, report by report in the model: that rule keeps a payroll model simple.

Our pay periods are weekly or fortnightly, but finance reports by month: can one model serve both?

Yes: one model serves both, with month fields standing beside each line's pay date. The Complete Excel Course with AI Integration builds those fields in Power Query: Lesson 159 adds year, month name, month number, month start and year-month columns from a single date, and the month number keeps months in calendar order instead of alphabetical. In SalesFusion the same columns are rebuilt inside the folder query in Lesson 167, so every period file arrives carrying them. The pay period stays a field of its own beside them. Lesson 172 places year above date in a PivotTable for a monthly trend, and choosing a year in the slicer totals every period loaded so far, the year to date. A period that straddles two months is yours to assign, by pay date or by period end.

Next period's export lands in the folder: does the whole model move on, or do I rebuild it?

It moves on: SalesFusion in The Complete Excel Course with AI Integration is built as a report that refreshes itself from a folder of files. Lesson 166 points Power Query at a folder, stacks every file in it and cleans each with the same recorded steps, so a file saved there later joins at the next refresh. Lesson 168 merges the stack with its lookups, appends the history and keeps the result as a connection for the model, and from Lesson 169 the Data Model, its relationships and its measures sit on top. Save the new pay period's export in the folder, press Refresh All, and the queries, the model and every PivotTable built from it advance by one period. Lesson 153 adds the one rule to keep: every source file stays in the project folder, or the connections break.

Before the cost report goes to finance, how do I prove the model's totals agree with the payroll system's?

A control query proves them, built in The Complete Excel Course with AI Integration at Lesson 161. Its Group By totals the SalesFusion staging data by year-month and region and counts its rows, biggest totals first, so a figure that looks too good stands out at once and a block of empty months exposes dates the file could not read. For payroll, group by pay period and department, then set those totals and line counts beside the summary your payroll system prints for the same run: when they agree, the model starts from the right numbers. Lesson 168 adds checks for blanks after every merge, the habit that catches a pay line whose employee ID the master does not know before any measure totals it. The control query itself stays connection-only, as Lesson 162 shows, out of sight until it is needed.

A year of pay lines for every employee runs to many thousands of rows: will a model cope where my lookup columns crawl?

Yes, and The Complete Excel Course with AI Integration teaches the habits that keep a growing model quick. The model holds each table once and relates them instead of repeating a lookup on every line, which is the whole point of Lesson 169. Lesson 162 gives the golden rule, load only the finished table and keep every staging query as a connection, so the workbook never fills with copies. Lesson 168 drops the file-name column once it has served, because unneeded columns bite back as a model grows, and Lesson 156 removes columns early so every later step has less to process. Measures add no columns at all: each is worked out when a PivotTable asks for it. A register that grows a period at a time stays a workbook you can open without a wait.

Is DAX harder to pick up than the SUMIFS formulas I already write on the register?

The measures a payroll report needs are short, and SUMIFS is good preparation for them. In The Complete Excel Course with AI Integration the first measure in Lesson 170 is a SUM of one column; the rest of the lesson adds DISTINCTCOUNT for a count of IDs, DIVIDE for ratios that never show an error, and CALCULATE with ALL for a share of the total, six measures in all. The real change from SUMIFS is where the conditions live: a SUMIFS carries its department and period inside every cell, while a measure is written once and takes its conditions from the rows, columns and slicers of the PivotTable. When a measure misbehaves, Check Formula leads to the cause, which in the lesson is amounts stored as text. Power Pivot runs on Excel for Windows, as the course requirements state.

Our finance team works in Power BI: is the DAX I would write in Excel the same language?

Yes: DAX is the formula language of Power BI as well as Power Pivot, so the measures The Complete Excel Course with AI Integration teaches in Excel are the kind finance writes there. Lesson 170 builds them in Power Pivot's own window, with SUM, DISTINCTCOUNT, DIVIDE, and CALCULATE with ALL. The modelling habits travel too: one table of transactions related to lookup tables on their IDs (Lesson 169), fed by clean data shaped first in Power Query, which Lesson 154 presents as an extract, transform and load routine whose output can go to Excel or to Power BI. The course keeps everything in Excel and leaves Power BI itself aside, so you report from the workbook payroll already shares, and you join any Power BI conversation knowing what a measure is and why it beats a column of formulas.

Finance wants the cost report one cost centre at a time: does every table need a filter of its own?

One slicer serves them all: Report Connections ties it to every PivotTable on the sheet, and The Complete Excel Course with AI Integration wires it up in Lesson 172. The SalesFusion dashboard holds four PivotTables from the Data Model, by category, by region, by month and a top ten, with slicers for category, channel, year and region, each linked to all four, so one click narrows the whole report. For payroll those tables become cost by department, cost by cost centre, the monthly trend and the ten largest overtime totals, with slicers for pay period, department, cost centre and employment type. Lesson 171 first sets the report out in tabular form without grand totals, leading with the figures people ask about first, which makes it quick to read and simple to export for the month-end pack.

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.