The Complete Excel Course with AI Integration
Power Query for credit controllers
Every week the same aged debt export lands, with amounts held as text, codes in mixed case and buckets spread across columns, and every week it is cleaned by hand before the chasing can start. The Complete Excel Course with AI Integration hands that routine to Power Query on SalesFusion, an industry-standard project, and this page picks out the lessons that do it: cleaning, merges for credit limits, Group By totals, a folder of snapshots and Unpivot.
Taught by Sagnik Bhattacharya and Virginia Thorn
What you will be able to do
At work, you will be able to:
- Bring the weekly aged debt or open-items export into Power Query as a live connection, not a pasted copy that is out of date by tomorrow.
- Clean customer codes, amounts and due dates once in the query, trimmed, set in one case and given true data types, so every later export arrives ready to age.
- Turn an aged debt report with a column per bucket into rows of customer, bucket and amount with Unpivot, ready for PivotTables and charts.
- Add each customer's credit limit with a merge, total the open balance with Group By and label accounts over their limit with custom and conditional columns.
- Set open invoices against receipts with merges and the join kinds, and catch the rows with no partner before they reach a report.
- Stack a folder of weekly ledger snapshots, or two companies' exports, into one table that takes in the next file on refresh, each row marked with its source.
- Prove every run with a Group By control query of totals and row counts, and load only the finished table to the sheet.
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.
The course's Power Query and data model project, its queries do the jobs a ledger export needs: faulty text and amounts made clean, codes looked up in other tables with merges, a folder of period files stacked and a wide grid turned into rows, each step replayed at every refresh.
-
Project 05
SalesPlusPerformance
A sales question answered in seconds, straight from the order data.
The course's PivotTable project, it shows what a clean table is for: totals by region, category and month in a few drags, slicers to narrow them, and Refresh All, the button that brings queries and PivotTables up to date together. On a ledger, that is the overdue book by customer and by collector.
Lessons
The lessons that matter, in course order.
The Complete Excel Course with AI Integration has 186 lessons. This page picks out 18 of them, 1 h 38 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 ledger already lives in Excel tables and you have built a PivotTable: SalesFusion grows from a single export to a folder of them, the order a credit team's files grow in, and Lesson 65 sits on the path for the Refresh All button. If tables and PivotTables are still new, the tables lesson (Lesson 19) and the PivotTables section from Lesson 57 come first, and if Excel itself is new, Lesson 1. Importing CSVs already? Skip ahead to the merges at Lesson 163.
18 of 186 lessons · 1 h 38 min
07 PivotTables and PivotCharts: data analysis made easy Refresh and Refresh All: PivotTables do not update by themselves, and one button brings every PivotTable in the workbook up to date, the same button that reruns its queries once the ledger arrives through Power Query.
- 65 Refresh a PivotTable in Excel Update pivots when source data changes 2 min
15 SalesFusion: advanced data tools and a Power Query modelling system The plan and the first import: ETL as extract, transform and load, the reason a clean-up is recorded once and replayed, and a CSV brought in through Get Data and opened in the Power Query Editor rather than dropped onto a sheet as it is.
- 153 Start here SalesFusion Power Query project Excel ETL pipeline and data model overview 5 min
- 154 Introduction to Power Query in Excel The ETL workflow explained 5 min
- 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 The clean-up an aged debt export needs: temporary columns removed and headers renamed, codes trimmed, cleaned and set in one case, symbols and NA stripped out of amounts, true number and date types, and year and month columns for reporting by period.
- 156 Clean columns in Power Query Remove and rename columns for modelling 5 min
- 157 Clean text in Power Query Trim, clean, replace values and fix text case 6 min
- 158 Data types in Power Query Fix date, whole number, decimal and text types 7 min
- 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 Rules and checks inside the query: custom and conditional columns that calculate and label, a Group By query of totals and row counts to tie back to the ledger, and the Close and Load choices that keep staging queries out of the grid.
- 160 Business logic in Power Query Custom and conditional columns for profitability 6 min
- 161 Group By in Power Query Summarise sales by month and region to validate data 5 min
- 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 Merges that bring a second table's columns in beside each row with a left outer join, the other join kinds read through, a finished query reused on a new file by changing only its source, and two cleaned tables appended into one.
- 163 Merge queries in Power Query Look up product and region names with a left join 5 min
- 164 Reuse a Power Query pipeline Duplicate queries for a new year of sales data 5 min
- 165 Append queries in Power Query Combine 2024 and 2025 sales tables 3 min
15 SalesFusion: advanced data tools and a Power Query modelling system A folder query that stacks every file in it and names each row's source file, one cleaning applied to all of them, extra columns built on top, and a fact table merged with its lookups, appended to history and checked for blanks.
- 166 From Folder in Power Query Combine every sales file in a folder automatically 9 min
- 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 Unpivot for wide exports: a column per period turned into rows of name and value that keep working when new columns appear. An aged debt report with a column per bucket unpivots in exactly the same way.
- 173 Unpivot columns in Power Query Turn wide month columns into a long table 8 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.
Can Power Query turn the weekly aged debt export into a report that refreshes itself, and where does a credit controller learn it?
Yes, and The Complete Excel Course with AI Integration from Coding Liquids builds exactly that routine on SalesFusion, an industry-standard project designed after talking with people from many different industries. Its queries take a messy export, record every fix as a step and replay the lot when the next file arrives, so the weekly clean-up shrinks to one press of Refresh All (Lesson 65). For credit control the lessons line up with the week: the export imported and cleaned (Lesson 155 to Lesson 159), credit limits merged in (Lesson 163), balances proved with a control query (Lesson 161), weekly snapshots stacked from a folder (Lesson 166) and bucket columns unpivoted into rows (Lesson 173). This page picks out 18 lessons, 1 hour 38 minutes in all, each practised on the course's own sales files, so by the time a query meets your ledger it has already worked once on data just as untidy.
Where does Power Query sit in a credit controller's week, between the system export and the chasing list?
In the middle, doing the part nobody should do by hand. The Complete Excel Course with AI Integration lays out the pipeline in its opening SalesFusion lessons: extract the file, transform it to one set of rules, load the result for reports (Lesson 154), with the steps recorded once and replayed at every refresh. For a credit team that reads: the system's export goes in; the query trims codes, fixes types, merges in credit limits and totals balances by customer; a clean table comes out on a sheet. From there the worksheet takes over: TODAY ages each invoice and stays current between refreshes (Lesson 39), FILTER builds the chasing list (Lesson 76) and PivotTables report the book. None of it needs a download, either: Get Data on the Data tab is where the import begins (Lesson 155).
The aged debt export puts each bucket in its own column: can Power Query turn that into rows?
Yes, with Unpivot, which The Complete Excel Course with AI Integration teaches on a wide export in Lesson 173. There a budget file arrives with a column for every month; Unpivot Other Columns keeps the descriptive columns fixed and turns every other column into pairs of name and value, renamed for reporting. Point the same step at an aged debt report laid out as customer, current, 30, 60, 90 and over, and it becomes three columns: customer, bucket and amount. In that long shape a PivotTable totals any bucket by customer, region or collector, a chart compares the buckets, and SUMIFS reads it without a formula per column. Because Unpivot Other Columns names none of the bucket columns, a system change that adds a bucket, say over 120 days, flows through the next refresh without breaking the query.
Can Power Query add each customer's credit limit to the ledger and flag who is over it?
Yes, in three recorded steps, each taught in The Complete Excel Course with AI Integration. Group By totals the open balance for every customer, the way Lesson 161 totals sales by month and region alongside a count of rows. A merge with a left outer join brings in the credit limit from the customer master and keeps every customer, whether or not a limit is on file (Lesson 163). Then a custom column divides balance by limit and a conditional column labels each account over or within its limit, the same tools Lesson 160 uses for a margin guarded against dividing by zero and a High or Normal label. A customer with no limit on file comes back blank, which is itself a list worth having. The query reruns at every refresh, so the over-limit view is always built from the latest export.
Can a query show which open invoices have been paid and which receipts match no invoice?
Yes, by merging the two lists on the invoice reference and reading the gaps, the method The Complete Excel Course with AI Integration teaches in its merge lessons. In a left outer join the first table loses no rows, and columns from the second arrive only on the rows that find a partner (Lesson 163): with open invoices first, an invoice whose receipt columns stay empty is still unpaid; with receipts first, a receipt with empty invoice columns is unallocated cash. Lesson 164 reads through the other join kinds on the list, right outer, full outer and inner among them, where a credit controller finds the version that shows both sides at once. Lesson 168 adds the closing habit: after every merge, check the new columns for blanks. Spreading one receipt across several invoices is not taught; exact matches on a shared reference rebuild themselves at each refresh.
We save a ledger snapshot every week: can Power Query stack them to show how the overdue book is moving?
Yes: point a folder query at the snapshots and every file becomes part of one table, the build The Complete Excel Course with AI Integration teaches in Lesson 166. Combine & Transform stacks the files and adds a Source.Name column naming the file each row came from, so a snapshot saved with its week in the file name keeps that week on every row. The cleaning is set once on the sample file and applies to every file in the folder, a new snapshot dropped in joins at the next refresh, and Lesson 167 builds extra columns on top. Load the result and a PivotTable with the snapshots down the side and the buckets across shows the overdue book week by week, the trend a finance director asks about and a single export can never show. Every snapshot must keep the same columns, which a system's standard export normally does.
Customer codes look identical, yet the merge misses some of them: why?
Because Power Query compares text exactly, and The Complete Excel Course with AI Integration flags this in Lesson 157: in a query, North and NORTH count as two different values, and a code with a trailing space differs from one without. A merge on customer codes therefore misses any pair that differs by a capital letter, a hidden space or a stray character, even when the two look identical on screen. The lesson's fix is the one to record before any merge: Trim and Clean the code column, set it to one case with UPPERCASE, and strip stray characters with Replace Values, all as steps of the query. Do the same to both tables and the merge of Lesson 163 pairs them up. Worksheet lookups forgive capitals; Power Query does not, which is why its clean-up comes first.
Can the query work out days overdue, or is that better left on the sheet?
On the sheet, with the query supplying clean dates, which is how the parts of The Complete Excel Course with AI Integration fit together. A query's output changes only when it is refreshed, while TODAY recalculates every time the workbook does (Lesson 39), so a days-overdue column built on the sheet stays right between refreshes without anyone pressing a button. Power Query's job is to deliver due dates that are real dates: Lesson 159 clears placeholders and impossible dates, sets the Date type and turns whatever still fails into blanks, so the subtraction on the sheet never meets text. The custom and conditional columns the lessons write inside queries, profit, margin, a value band and a return flag (Lesson 160), suit the rules that do not depend on today's date, such as a customer's segment or credit status.
Some weeks the export's dates come through as text and the ageing breaks: can the query stop that for good?
Yes: a data type set in the query applies to every export that follows, and The Complete Excel Course with AI Integration builds that reliability step by step. Lesson 158 turns text columns into true numbers, replacing quantities written as words and stripping stray symbols first, because a report on text columns looks fine and calculates wrong. Lesson 159 does the same for dates, stepping back through Applied Steps to watch each fix land, then catches whatever still will not convert with Replace Errors. Later, in a Windows lesson, a DAX measure fails on an amount stored as text, and the fix is made where it belongs, back in the query (Lesson 170). For a credit team the payoff is plain: the week the system writes a date oddly, the query leaves a blank that a filter finds at once, instead of an error running through every formula downstream.
How do I prove the query's totals match the ledger before the report goes out?
With a control query, which The Complete Excel Course with AI Integration builds in Lesson 161. A Reference to the cleaned query, so it always follows its source, is summarised with Group By into a total and a count of rows for each month and region, sorted biggest first so that a figure which looks too good stands out. On a ledger, group by customer or by bucket instead, set the grand total against the debtors control account and the row count against the number of open items the system reports: when both agree, the cleaning lost nothing and doubled nothing. Rows with unreadable dates gather in a null group, a warning the lesson explains. Lesson 168 adds the second check: after merges and appends, filter each key column for blanks before anything is loaded.
Two companies in the group export their ledgers separately: can I combine them?
Yes, by appending them, and The Complete Excel Course with AI Integration shows the whole route. Build the cleaning once on the first company's file; Lesson 164 then copies the query and swaps only its Source step to the second file, so every recorded fix carries across, and the lesson audits the new file anyway, since it brings blanks of its own. Lesson 165 appends the two cleaned queries as a new query, which leaves both sources untouched, so a fault in the combined table can be traced to its file, and relies on the column headers matching. The lessons stack two years of sales; two entities stack the same way, and a custom column naming the company in each query (Lesson 160) keeps the group view and each single-company view one filter apart.
Will the colleague who covers my desk be able to run the query while I am away?
Yes, when it is built the way The Complete Excel Course with AI Integration builds SalesFusion. Every change sits in the Applied Steps list as a named step, renamed where the default name says too little (Lesson 156), so a colleague can click through and see the data at each stage. The Queries & Connections pane previews each query's rows and shows when it last refreshed (Lesson 162), and the routine itself is one button, Refresh All (Lesson 65). The lessons add the rule that keeps it working on another desk: keep every source file in the same project folder, or the connections break (Lesson 153). Point the query at a shared folder the team can reach, and holiday cover stops meaning a week of hand-cleaned exports and a chasing list nobody trusts.
Can the cleaned ledger feed PivotTables, the chasing list and a data model all at once?
Yes, from one query, and The Complete Excel Course with AI Integration teaches the loading choices that keep it tidy. Close and Load can send a query to a table on a sheet or to the Data Model, or keep it as a connection only (Lesson 162), and the lesson's golden rule is to load only the finished table, never every staging step, or the workbook grows slow. A loaded table feeds PivotTables and the FILTER formulas of a chasing list directly. The Data Model goes further: Lesson 169 relates tables in Power Pivot's Diagram View and Lesson 170 writes DAX measures such as a distinct count of orders, which on a ledger counts each open invoice once however many lines it has. Those Power Pivot lessons need Excel for Windows; the course's requirements name Windows for nothing else on this page.
How far into the path before my own aged debt export is cleaning itself?
Before the halfway mark: by Lesson 159 one export has gone from import to clean text, true numbers and real dates, and rebuilding those steps on your own export means that clean-up is never done by hand again. The full path in The Complete Excel Course with AI Integration runs 1 hour 38 minutes, adding the control query, merges for limits and receipts, appends, the folder of snapshots and Unpivot for bucket columns. The SalesFusion files and the finished workbook come with the course, so every query can be checked against a working answer before you point it at the ledger. Lifetime access keeps the lessons to hand for the day the system's export changes shape, and with the instructor support plan a question about your own export is answered by the instructor in writing for two months from the day you switch it on.
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 credit controllers
- Lookups for credit controllers
- PivotTables for credit controllers
- Excel charts for credit controllers
- Dashboards for credit controllers
- Conditional formatting in credit control
- Data cleaning for credit controllers
- Data validation for credit controllers
- Excel tables for credit controllers
- Text functions for credit controllers
- Date functions for credit controllers
- Dynamic arrays for credit controllers
- Power Pivot and DAX for credit control
- Macros and VBA for credit controllers
- Power Automate for credit controllers
- Copilot in Excel for credit controllers
- ChatGPT for credit controllers
- Claude in Excel for credit controllers