The Complete Excel Course with AI Integration
Power Pivot and DAX for government officers
An officer's figures rarely sit in one table: spending in one export, codes and district names in others, targets somewhere else. The Complete Excel Course with AI Integration teaches Power Pivot and DAX inside its industry-standard SalesFusion project, on a path that runs from clean tables loaded to a data model, through relationships and measures that count, divide and compare, to a report and a dashboard that answer by district and year.
Taught by Sagnik Bhattacharya and Virginia Thorn
What you will be able to do
At work, you will be able to:
- Load cleaned spending, programme and reference tables into Excel's data model, keeping the working queries as connections.
- Relate a fact table to its lookup tables in Diagram View, so district, department or scheme names reach every row with no lookup filled down.
- Write DAX measures for totals and ratios, using DIVIDE so that a zero allocation shows a blank rather than an error.
- Count distinct suppliers, beneficiaries or cases with DISTINCTCOUNT, correct for whatever district or period a slicer picks.
- Show each district's or scheme's share of the total with CALCULATE and ALL, so the share stays right as the report is filtered.
- Build a tabular report from the data model, led by the figures directors ask about first, and join PivotTables, slicers and a ranked list into one dashboard.
- Report by financial year and month from fields added in Power Query, with a year-month field that keeps periods in calendar order.
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, its second half is the data-model route an officer's reporting needs: a clean fact table related to its lookup tables, DAX measures for totals, shares, distinct counts and averages, and a dashboard of connected PivotTables and slicers.
-
Project 09
FinanceGuard
The budget vs actual report finance teams send every month.
Built as the course's finance project, it sets out the figures a government model is asked for, variance, percent variance and budget utilisation, on a PivotTable sheet; the DIVIDE measures of SalesFusion are how those same ratios live inside a data model.
-
Project 05
SalesPlusPerformance
A sales question answered in seconds, straight from the order data.
The course's PivotTable project on order-level sales, it lays the groundwork a data-model report stands on: fields in rows and values, dates grouped, slicers and refresh, every one of them used again once the PivotTables read the model.
Lessons
The lessons that matter, in course order.
The Complete Excel Course with AI Integration has 186 lessons. This page picks out 9 of them, 1 h of video. Each lesson keeps its number in the course.
Where to start
Lesson 153 SalesFusion Power Query project
Begin with Lesson 153, which shows the finished SalesFusion report and why a data model sits behind it; the lessons after it on this path prepare the tables the model reads. Power Query already second nature? Skip ahead to Lesson 169, the first Power Pivot lesson, run like all of Power Pivot on Excel for Windows. New to PivotTables? Work through Lesson 57 onwards first, or Lesson 1 for anyone meeting Excel for the first time.
9 of 186 lessons · 1 h
15 SalesFusion: advanced data tools and a Power Query modelling system The SalesFusion plan: Power Query to clean, a data model to map how the tables relate, and the finished report with slicers that the section builds towards, so the purpose of the model is clear before a relationship is drawn.
- 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 Date fields made in Power Query, the year, month name, month number, month start and year-month, which the model's reports group by; the lesson shows why months sort alphabetically without a number beside them.
- 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 Close and Load choices, connection only, a worksheet table or the Data Model, and the rule of loading only finished tables, so the model holds what the reports need and nothing more.
- 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 Fiscal year and profit columns added to the folder query, then one master fact table built from the earlier years and the folder files, merged with its lookups, checked for blanks and held as a connection ready for the model.
- 167 From Folder automation in Power Query Profit metrics and fiscal year columns 7 min
- 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 Power Pivot itself, which needs Excel for Windows: the cleaned tables loaded to the data model and related in Diagram View, then six DAX measures from SUM to DISTINCTCOUNT, each read by Check Formula and tested in a PivotTable.
- 169 Power Pivot Data Model in Excel Relationships and Diagram View 6 min
- 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 The model put to work: a tabular PivotTable report led by the measures readers ask about first, then a dashboard of four PivotTables from the data model, four slicers joined to all of them by Report Connections and a Top 10 view, in one style.
- 171 PivotTable report from the Data Model Format the SalesFusion report in Excel 5 min
- 172 Interactive Excel dashboard Data model PivotTables, slicers and styling 10 min
Instructors
Who teaches it.
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 government officers: how do they answer the same figures by district, scheme and year without a new sheet for each request?
Through one data model whose measures answer any cut, and The Complete Excel Course with AI Integration from Coding Liquids builds that very model in Excel. Its SalesFusion project, industry standard and designed after talking with people from many different industries, loads clean tables into the data model, relates a fact table to the lookup tables that name its codes, and writes DAX measures for totals, shares, distinct counts and averages that answer for every district, month or scheme a report is filtered to. A tabular report and a dashboard of connected PivotTables and slicers then sit on top of the model. The 9 lessons on this path, 1 hour in all, begin with the clean tables a model depends on and finish at that dashboard. The course practises on sales files; your spending table, scheme list and district list take their places one for one. Power Pivot itself needs Excel for Windows, the one requirement these lessons add.
Our grant register, payments and district list are separate tables: why relate them in a model rather than look everything up into one sheet?
Because a relationship does once what a lookup does row by row, and The Complete Excel Course with AI Integration shows the difference in Lesson 169. There the sales table, the region list and the product list are loaded into the data model and joined in Diagram View by dragging the region code onto the region code and the product ID onto the product ID: two one-to-many relationships, each code listed once in its lookup table and many times in the sales table. The lesson's own comparison is a VLOOKUP dragged down ten thousand rows, which a relationship replaces. For an officer, payments relate to the grant register by grant reference and to the district list by district code, and every PivotTable on the model can show district names, scheme types and amounts together, with no lookup column to break when a row is added. The tables stay separate and tidy, as their owners keep them.
Can a measure count how many different suppliers were paid in whatever district and month a slicer picks?
Yes: DISTINCTCOUNT does it, and The Complete Excel Course with AI Integration writes that measure in Lesson 170. In SalesFusion an order has a row for every product on it, so counting rows would overstate the orders; the Orders measure counts each order ID once, however many rows it spans. Point the same measure at a supplier ID in a payments table and it counts suppliers, not payments. Because it is a measure, the answer recalculates for every filter: a slicer on district and month gives the distinct count for exactly that selection, and a PivotTable with districts down the side gives each district its own count, with no helper column. The same works for beneficiaries, facilities or cases that carry several entries each. Count from the ID rather than a name, which may be typed two ways, and let Lesson 157 show how Power Query tidies such text first.
Can a measure show spending as a share of the allocation for any department or month a director picks?
Yes, with DIVIDE, the function The Complete Excel Course with AI Integration uses for every ratio in Lesson 170. Margin Percentage there is a DIVIDE measure, and DIVIDE returns a blank rather than an error when the bottom figure is zero, so a department with no allocation yet shows an empty cell instead of a broken report. Hold allocation and spending side by side in one table, the way FinanceGuard's model sheet sets budget beside actual (Lesson 117), and a utilisation measure is spending divided by allocation: the burn rate officers watch through the year. As a measure it answers for whatever the report shows, a department, a month, a district or the whole organisation, recalculating with each slicer click. FinanceGuard works out the same ratio as Budget Utilization on its PivotTable sheet (Lesson 120), which tells you the figure to expect before you trust the measure.
Can I show each district's share of the total and keep it right when the report is filtered?
Yes: CALCULATE with ALL is the DAX for it, and The Complete Excel Course with AI Integration builds exactly that measure in Lesson 170. Sales Percentage of Total by Category divides each category's sales by a total worked out with CALCULATE and ALL on the category column, which sets the category filter aside so the bottom of the fraction is the whole. Swap category for district and each district's row shows its share of the total. Because ALL clears only the district filter, a slicer on year or scheme still applies to both halves, so the shares describe the selected year and add up to the whole of it. Doing that by hand means a fresh set of formulas for every view; as a measure it is written once and every PivotTable on the model can use it. Lesson 172 then sets such measures out on a dashboard that slicers control.
Average days to close a case and the share closed on time: can measures track those for every district?
Yes, by combining two patterns The Complete Excel Course with AI Integration teaches. AOV, the average order value of Lesson 170, is total sales divided by the number of distinct orders, both measures joined with DIVIDE; average days to close has the same shape, total days open divided by the number of distinct cases. For the share closed on time, give each case a flag in Power Query first, a conditional column holding one for on time and zero for late, the kind of column Lesson 160 builds, then a measure that sums the flags and divides by the case count. The days open come from a date subtraction of the kind Lesson 39 works on the worksheet, kept as a column in the table the model reads. Both measures answer for any district, month or team the report is filtered to, and service figures that once took an afternoon of formulas refresh with the data.
Should a rule like eligible or on time be worked out in the query or as a measure?
Each has its own home, and The Complete Excel Course with AI Integration teaches both so every rule lands in the right one. A label that belongs to a single row, eligible or not, on time or late, above or below a limit, goes in Power Query as a custom or conditional column, the way Lesson 160 builds High and Normal, Return and Sale: it is worked out once at refresh and every report sees the same answer. A figure that must change with the report, a total, an average, a share of the whole, belongs in a DAX measure, the way Lesson 170 builds Total Sales and Margin Percentage, because a measure recalculates for each district, month or slicer choice. The lessons put the split plainly: Power Query cleans the data, Power Pivot connects it, and measures do the arithmetic that depends on the view. Many officer reports need both, a flag column and then a measure that counts it.
Can the model report by our financial year and set this year beside last?
Yes: the financial year arrives as a column, and The Complete Excel Course with AI Integration adds it where it belongs, in the query. Lesson 167 gives the folder query fiscal year columns beside its profit metrics, and Lesson 159 adds year, month name, month number, month start and year-month fields, explaining why months need a number or a year-month beside them to run in calendar order rather than alphabetically. Once the fact table carries those fields, any PivotTable on the model can put financial years across its columns and months down its rows, with the measures filling every cell; the dashboard of Lesson 172 places Year above the sale date in its Monthly Trend table in just that way. DAX's own time-intelligence functions, year-to-date and same period last year, lie beyond the lessons; a model that sets one financial year beside another through its fields is, and it answers the year-on-year comparison a return asks for.
Can the model's report list the ten schemes with the largest spend, and keep that list current?
Yes: the Top 10 value filter does it on a data-model PivotTable, and The Complete Excel Course with AI Integration uses it on the SalesFusion dashboard in Lesson 172. There a PivotTable of product names, filtered with Value Filters to the ten highest by sales, becomes a Top 10 Products table beside the category, region and monthly views. Swap products for schemes or suppliers and the measure for spending, and the list ranks itself from the model. Because the filter works on the measure, it recalculates with the slicers: pick a district or a year and the ten largest for that choice take their places. The same lesson connects four slicers to all four PivotTables through Report Connections, so one click changes every table at once, and styles them to match. For a briefing, that answers where the money went in a single table that never needs re-ranking by hand.
A measure's total will be quoted in a briefing: how do I make sure it is right?
Test it before it is quoted, and The Complete Excel Course with AI Integration shows how in Lesson 170. Measures are written through Power Pivot's measure dialog, and Check Formula, reached through Manage Measures, reads a measure for errors; when Total Sales failed there, the lesson traced the fault to a sales column stored as text, fixed the type in Power Query and rebuilt the measure. That habit, fixing the data at its source rather than patching the measure, keeps a model honest. Then compare: the Group By query of Lesson 161 gives totals and row counts by month and region straight from the cleaned data, so a measure's total for any month should match it exactly. Finally, read the measure in a small test PivotTable, as the lesson does, where any figure can be tested against a handful of rows worked by hand. A briefing figure that has passed all three can be defended line by line.
District offices will read the model's report without me there: how do the lessons make it readable?
By cutting it down to what readers ask for, the way The Complete Excel Course with AI Integration finishes the SalesFusion report in Lesson 171. The lesson drags Category to the rows, removes two measures from the values, turns grand totals off for rows and columns, switches the layout to tabular form and reorders the values so profit and its margin lead, with the money figures formatted to match. Its reasoning suits an office report: a focused table communicates faster than a complete one, tabular form gives each field its own column for reading and exporting, and the figures people ask about first come first. For a district office, that might be spending, its share of the allocation and the count of cases, in that order, by scheme. Lesson 172 then adds headings, matching styles and slicers that readers click for themselves, so the report answers questions without its author in the room.
I write SUMIFS and IF every day: will DAX feel familiar or like a new language?
Familiar from the very first measure, and The Complete Excel Course with AI Integration builds from there to the one genuinely new idea. Total Sales in Lesson 170 is simply SUM of a column, written once as a measure; DIVIDE handles the zero that IFERROR handles on the worksheet; DISTINCTCOUNT does in one function what COUNTA round UNIQUE does on a sheet. The genuinely new idea is that a measure has no cell reference: each PivotTable cell supplies its own filters, the district on its row and the month in its column, so one formula answers every cell. CALCULATE with ALL is the first measure that changes those filters, and the lesson builds it for a share of the total. That is the leap from SUMIFS, where you type every condition, to a measure, where the report supplies them, and the course takes it with you one measure at a time on real data.
The Power Pivot tab is missing from my Excel: will the lessons show how to bring it in, and what machine do I need?
They do, on any PC running Excel for Windows. Lesson 169 in The Complete Excel Course with AI Integration opens the model from the Data Model icon on the Data tab, chooses Manage Data Model and enables the data analysis add-ins when Excel offers them, which is how the Power Pivot window and its tab appear; Lesson 170 then writes every measure from Power Pivot's Measures menu. Windows is what the course asks for in its Power Pivot section, as in the Power Automate one, so these lessons need a Windows machine, while the Power Query lessons before them do not. If the tab vanishes later, the same Data Model route is the place to start, and an IT team that manages add-ins needs only the name Power Pivot to find the right switch. Everything else on this path, from the clean tables to the dashboard, is built in the Excel window you already use.
Must I learn Power Query before Power Pivot, or can I go straight to the model?
Learn the part of Power Query that feeds the model first, and The Complete Excel Course with AI Integration keeps that part short on this path. A data model is only as good as its tables, and the measure in Lesson 170 that failed on a sales column held as text shows why. So the path picks the Power Query lessons a model leans on: the plan of Lesson 153, the date fields of Lesson 159 that reports group by, the loading options of Lesson 162, one of which sends a table to the data model, and the fiscal year columns and master fact table of Lesson 167 and Lesson 168. If your tables are already clean and typed, start at Lesson 169 and load them to the model as the lesson does. The whole path takes 1 hour, with the SalesFusion dataset and finished workbook in the course, and lifetime access for the day a new table joins your model.
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.
The same course
For another job, skill, goal, level, topic or comparison.
The course for this job
More skills for this job
- Formulas for government officers
- Lookups for government officers
- PivotTables for government officers
- Charts for government officers
- Dashboards for government officers
- Conditional formatting for government
- Data cleaning for government officers
- Data validation for government officers
- Excel tables for government officers
- Text functions for government officers
- Date functions for government officers
- Dynamic arrays for government officers
- Power Query for government officers
- Copilot in Excel for government officers
- ChatGPT for government officers