The Complete Excel Course with AI Integration

Power Pivot and DAX for health and safety officers

Monthly safety reporting joins the incident log to hours worked, site details and causes, and many officers do it by pasting columns into one giant sheet. The Complete Excel Course with AI Integration replaces the pasting with a Power Pivot data model, built on the industry-standard SalesFusion project, and the lessons below follow a report's order: tables shaped for the model, relationships, DAX measures for counts, shares and rates, then a report every site can filter.

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 incident log, a site list and a cause list into the Excel Data Model and relate them in the Diagram View of Power Pivot, so site names and causes reach every report without a lookup filled down thousands of rows.
  • Count every incident once with a DISTINCTCOUNT measure, even when one event fills several rows of the log for several injured people or causes.
  • Write DAX measures with SUM and DIVIDE for lost days, average days lost per incident and a frequency rate per site that shows a blank, not an error, where no hours are recorded.
  • Show each cause's share of all incidents with CALCULATE and ALL, so the share stays true while a site or severity slicer is on.
  • Give incident dates year, month name, month number and year-month columns in Power Query, so the model reports each month in its proper place, first to last.
  • Unpivot an hours-worked return or an inspection plan that runs one column per month, giving the data model a long table it can relate and total by month.
  • Build the safety committee's report from the Data Model: tabular PivotTables by cause, site and month, a Top 10 filter on locations, and slicers joined to every table through Report Connections.
  • Trace a failing measure with Check Formula to a column stored as text, and fix it where the data is shaped so next month's export cannot break it.

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 files, it ends with a model of the very kind a multi-site safety report needs: a cleaned main table related to two lookup tables in Diagram View, six DAX measures from SUM to DISTINCTCOUNT, and four PivotTables that four slicers filter together, every piece made by your own hand.

  • Project 05

    SalesPlusPerformance

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

    Made from order-level sales data, SalesPlusPerformance drills the PivotTable moves every report from a model depends on: fields dragged into rows and values, dates grouped by month, slicers, PivotCharts and Refresh All for the day a new month of incidents arrives.

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 6 min of video. Each lesson keeps its number in the course.

Where to start

Lesson 153 SalesFusion Power Query project

Begin with Lesson 153 when your incident log is already held as a table and PivotTables are familiar ground: the SalesFusion lessons here run from shaping the tables to the finished report. Never built a PivotTable? Take them from Lesson 57 first, since every report from the model is one. New to Excel altogether? Begin at Lesson 1. Already loading clean queries at work? Go straight to Lesson 169, where Power Pivot opens on Windows.

10 of 186 lessons · 1 h 6 min

15 SalesFusion: advanced data tools and a Power Query modelling system 2 of 21 lessons · 11 min The plan before the build: messy sales exports turned into a connected reporting system that refreshes, with Power Query making the data usable and the data model making it useful. Hold that picture against the incident log, site list and hours return you join by hand today.
  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
15 SalesFusion: advanced data tools and a Power Query modelling system 1 of 21 lessons · 7 min Dates a model can report by: year, month name, month number, month start and year-month columns made from one date column, so incidents total by month and the months line up from first to last instead of from A to Z.
  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 1 of 21 lessons · 5 min Close and Load with three destinations to choose from: connection only, a worksheet table or the Data Model. Staging queries stay out of the grid, which keeps a workbook holding years of incident history quick to open.
  1. 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 One main table for the model, built from lookups and history and checked for blanks after every merge and append: the shape a log of past years plus this year's site returns must reach before Power Pivot reads it.
  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, in lessons that need Excel for Windows: three tables loaded to the Data Model and related one-to-many in Diagram View, then six DAX measures written, tested with Check Formula and repaired at the source when a column turns out to be text.
  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 a model feeds: a tabular PivotTable of the key measures with grand totals switched off, then a dashboard of four PivotTables from the Data Model, a Top 10 filter on one of them, and four slicers that filter all four at once through Report Connections.
  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 grids a safety team is sent, hours worked or planned inspections kept as one wide row per site with the months side by side: a wide export reshaped so each month becomes rows of month and amount that the model can relate, and that keeps working when next month's column appears.
  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.

How does a health and safety officer compare a large site fairly with a small one, and can Power Pivot and DAX do that for every site at once?

By rate rather than by raw count, and Power Pivot and DAX work that rate out for every site at once. The Complete Excel Course with AI Integration from Coding Liquids covers the whole method on SalesFusion, which, like every project in the course, is industry standard and was designed after talking with people from many different industries: one main table of events, lookup tables related to it in Power Pivot, DAX measures that count, total and divide, and PivotTables filtered together by slicers. The 10 lessons chosen here run from shaping the tables to the finished report, 1 hour 6 minutes in total. The lessons work on sales files: put your incident log where the sales table sits and your site and cause lists where the product and region tables sit, and every relationship and measure carries over. Every step is yours to build on the SalesFusion files, with the completed workbook beside you as the answer key.

My incident PivotTable runs off one long sheet with the site name and region copied into every row: what does a data model change?

It ends the copying. In The Complete Excel Course with AI Integration, Lesson 169 loads a main table and two lookup tables into the Data Model and joins them in Diagram View by dragging one code column onto its match, a one-to-many relationship: each code appears once in the lookup and many times in the main table. For your log, the site list holds each site's name, region and manager once, and the incident log keeps only the site code. Move a site to another region and you change one row of the site list; every PivotTable built from the model reads the new region after a refresh. The lesson's own point is that a relationship replaces a VLOOKUP dragged down the whole table, so the workbook stays lighter and the log stays a record of events, not of addresses.

Can the incident log, the hours worked and the site list be reported together while they sit in separate files?

Yes: each file reaches the model as a table of its own, and Power Pivot reports them side by side. The Complete Excel Course with AI Integration loads three queries into the Data Model in Lesson 169, with Add this data to the Data Model ticked, and joins them up in Power Pivot. Before that, Lesson 162 shows the choice every query gets at Close and Load, connection only, a worksheet table or the Data Model, and Lesson 168 builds the main table the model rests on, checked for blanks after each merge and append. In your workbook the incident log becomes the main table and the site list a lookup, and the same drag in Diagram View ties the hours table to that site list too. One PivotTable can then set incidents beside hours for each site, while the files themselves are never pasted into one sheet.

Can a DAX measure give each site's frequency rate without an error where no hours have been entered yet?

Yes: DIVIDE is made for that case, and The Complete Excel Course with AI Integration puts it to work in Lesson 170. Two of the measures written there, Margin Percentage and AOV, divide one total by another with DIVIDE, which returns a blank instead of an error when the bottom figure is zero. A frequency rate has the same shape: injuries divided by hours worked, multiplied by the reporting base your organisation uses. Written as a measure, it recalculates for whatever the PivotTable or a slicer shows, so one formula gives the rate for the company, for a region or for a single site. A new site with no hours return yet shows an empty cell instead of an error code in the board report. The definition of the rate stays yours; the arithmetic becomes one formula kept in the model.

One incident with three injured people fills three rows of our log: how does the model count it as one?

With DISTINCTCOUNT, and The Complete Excel Course with AI Integration meets the very same problem in sales form. In Lesson 170 an order that holds several products takes a row per product, so a plain count of rows would overstate the orders; the Orders measure uses DISTINCTCOUNT on the order reference and counts each order once. Point the same measure at your incident reference, and an event with three injured people, or with two contributing causes on separate rows, counts once as an incident while a SUM of lost days still adds every person's time off. Put both measures in one PivotTable and the committee sees events and their cost together, by site or by cause, without anyone deleting rows by hand. The log keeps its full detail, and the measure decides what counts as one event.

Can the report show what share of incidents each cause accounts for, and keep it right when one site is picked?

Yes, with the percent-of-total measure that The Complete Excel Course with AI Integration builds in Lesson 170. The lesson's measure divides each category's sales by the total for all categories, using DIVIDE, CALCULATE and ALL: ALL clears the category filter inside the measure so the bottom figure is always the full total, while every other filter stays on. Rebuilt on your log, each cause's row shows its share of all incidents, and when a site slicer is clicked the shares become shares of that site's incidents, still adding up to the whole. That is the figure behind a Pareto discussion at the safety committee, the few causes behind most events, read straight from the model for one site or for the company, and never worked out again on a calculator before the meeting.

Which DAX functions does a monthly safety report lean on, and does the course teach them?

Five, all taught in Lesson 170 of The Complete Excel Course with AI Integration: SUM for totals such as lost days, DISTINCTCOUNT for events counted once, DIVIDE for rates and averages that never show an error, and CALCULATE with ALL for a share of the whole. Together they cover most of a monthly safety pack: how many incidents, how many days lost, the rate against hours worked, the average days lost per incident and each cause's or site's share. The lesson writes six measures with them through Power Pivot's New Measure box, then uses Check Formula to catch a mistake before it reaches a report. Time-intelligence functions are outside the course, yet a model with the year and month columns of Lesson 159 still reports any month and sets one year beside another in a PivotTable.

A measure on lost days threw an error because the export holds them as text: does the course show how to fix that?

Yes, and it walks through that very fault. In Lesson 170 of The Complete Excel Course with AI Integration the first measure fails; Check Formula in the Manage Measures box points at the sales column, which the raw file stored as text, and the fix is made where the data is shaped, in Power Query, before the measure is rebuilt. Lost days, hours worked and injury counts arrive from safety systems and online forms in the same state, and Lesson 158 sets each column's data type for good: whole numbers for days, decimals where hours carry fractions, real dates for the incident date. Once the type is right in the query, every refresh brings the figures in as numbers, so the measure never breaks again on next month's export, and reading that error once saves a morning of guessing later.

Can a site manager pick their own site once and see the cause, month and location tables of the safety pack all change together?

Yes: Report Connections does it, and The Complete Excel Course with AI Integration sets it up in Lesson 172. The lesson builds four PivotTables from the Data Model, by category, by region, a monthly trend and a ranking of the leading products, then adds four slicers and links each one to all four tables, so one click narrows the whole page. On your report the tables become incidents by cause, by site, by month and the worst locations, and the slicers become site, severity, year and region. A site manager clicks their own site and every table and every measure follows, with no stale filter left behind on a table nobody noticed. Matching slicer and PivotTable styles give the page one look, ready to put on screen in the safety meeting.

Should a lost-time flag on each incident be built in the query or as a DAX measure?

In the query, with the rate built on it in the model: The Complete Excel Course with AI Integration teaches both halves and where each belongs. A flag describes one row, so it is a Power Query column: Lesson 160 adds a conditional column that labels each sale by its value and a custom column that marks returns, and the same pattern labels each incident lost-time or not from its lost days. That column then serves as a slicer or a row heading. A rate describes a group, so it is a measure: Lesson 170 writes DIVIDE measures that work out a ratio for whatever the PivotTable shows, a site, a region or the company. Lesson 169 sums up the split in one line, Power Query cleans the data and Power Pivot connects it, and a model built that way stays easy to explain to an auditor.

Do I need to download Power Pivot, and will it run on the laptop my company issued?

Power Pivot is already part of Excel for Windows, so nothing needs installing, and The Complete Excel Course with AI Integration switches it on in Lesson 169 from the Data Model button on the Data tab, with one click to enable the data analysis add-ins. Windows appears in the course's requirements for the Power Pivot lessons, so a Windows laptop with desktop Excel is what those lessons expect; on a Mac, the Power Query lessons earlier in SalesFusion still run. A workbook passed on by a colleague may open with its data connections disabled, and Lesson 170 shows the Enable Content step that brings the model back to life. Everything else on this page, from the date columns to Unpivot, is Power Query, which ships with Excel and starts from the Get Data button on the ribbon.

Can the board report list the locations with the most incidents without me sorting anything each month?

Yes: a Top 10 value filter on a PivotTable from the model does it, and The Complete Excel Course with AI Integration adds one in Lesson 172, where the fourth table of the dashboard ranks the leading products by sales. On your report the same filter ranks locations, causes or contractors by incident count or by lost days, and the ranking rebuilds itself whenever the data is refreshed or a slicer changes, so it always reflects the current figures for the chosen site. Along the way the row labels are renamed, percentages are set to two places and one heading style is copied across with Format Painter, the finishing touches that make a ranking readable at a glance. The committee sees where to look first, and the hour before the meeting goes on the reasons behind the list.

Hours worked and planned inspections reach me laid out one column per month: can the model still use them?

Yes: Unpivot reshapes them into the long table a model reads, and The Complete Excel Course with AI Integration works on that very layout in Lesson 173. There a wide budget export, months running across the top, is unpivoted around its descriptive columns, so each month becomes rows holding the month and its figure; the month text becomes a proper date, while the budget sales and target units are split back into separate columns. Feed it your hours-worked return or your inspection plan and out comes a long table of site, month and figure that the model can relate and total, so inspections done can sit beside inspections planned. The step never names a particular month, which is why next month's new column is taken in at refresh with the query left untouched.

How soon could next month's safety report come from a model instead of from copied sheets?

Within about 1 hour 6 minutes of lessons, so a month that starts with the course can close with a report drawn from a model. The date columns and the main table come first, ready by Lesson 168; then The Complete Excel Course with AI Integration relates the tables in Lesson 169, writes the measures in Lesson 170 and lays out the slicer dashboard in Lesson 172. Work along on a copy of your incident log, site list and hours return, never the live register, and each step finished on the SalesFusion files becomes a step finished on yours. The course's dataset and its completed workbook let you test a relationship or a measure against a working answer first. When the model later needs a contractors list or a training table, lifetime access means each lesson is still there, and finishing brings a Certificate of Completion an employer can check.

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.