Financial Modeling in Microsoft Fabric: the talk, slides and files
Can one Microsoft Fabric workspace take a raw general ledger all the way to a Profit & Loss, a Balance Sheet, a Cashflow Statement and a valuation?
TL;DR
- Yes. In this talk, a synthetic retail general ledger lands in a Fabric lakehouse through Dataflow Gen2. It moves through bronze, silver and gold layers, gets enriched in a Spark notebook with Data Wrangler and runs on a pipeline. A Power BI report on top shows the three financial statements, their ratios and a corporate valuation.
- The full recording is below. It's the closing session of our Financial Modeling with Microsoft Business Intelligence series.
- The slides, the notebook and the Dataflow Gen2 (Power Query M) script are in one public repository. The Power BI file will be added later.
- Everything runs on synthetic data, so you can rebuild it in a Fabric trial workspace.
Why build financial statements in Fabric at all?
Finance reporting usually spans several tools. Data is extracted in one place, reshaped in another and modeled in a third, and each handoff is a copy someone has to reconcile. Fabric puts ingestion, storage, notebooks, orchestration and Power BI in one workspace over one copy of the data in OneLake. This talk tests whether that holds up for a real accounting model.
The accounting itself stays simple. Assets equal liabilities plus owners' equity. Assets and expenses increase with debits; liabilities, equity and revenue increase with credits. Our goal was a star schema built on journal-entry transactions, with a calendar and a chart of accounts around the general ledger. The first part of the series explains that model in detail.
What does the talk build, step by step?
The demo moves one dataset through five Fabric workloads, in the order the slides present them. Each step hands a cleaner table to the next, and the last step is a Power BI report reading straight from the lakehouse.
- Lakehouse. A Delta Lake store with a SQL endpoint, organized as a medallion: bronze for landing, silver for validated tables, gold for model-ready tables.
- Dataflow Gen2. Power Query Online pulls the general ledger and budget CSVs from our public Randomized Retail GL Generator. It splits them into silver tables: general ledger, transaction descriptions, chart of accounts, budgets, a calendar and a financial-statement layout.
- Notebooks. PySpark and Spark SQL join the ledger to its transaction descriptions, flag the seeded anomalies and write a gold general-ledger table back to the lakehouse.
- Data Wrangler. Its point-and-click interface writes the PySpark code for one-hot encoding of transaction descriptions. A correlation heatmap then explores the result ahead of any machine-learning work.
- Data pipelines. One pipeline runs the dataflow and then the notebooks. The slides also cover the success, failure, completion and skip paths a pipeline can take between activities.
- Power BI. A Direct Lake semantic model sits over the gold tables. The report covers a Profit & Loss, a Balance Sheet, a Cashflow Statement and a corporate valuation built from discounted cash flows, a revenue multiple and comparable company analysis.
The DAX behind those pages comes from earlier posts: Financial Modeling in Power BI (part 3) for the statements and ratios, and Discounted Cash Flows in Power BI for the valuation.
What's in the companion repository?
The repository holds the working files from the talk, cleaned for public use. Workspace and lakehouse IDs, saved outputs and account details have been removed. You can also download the deck as a PDF. The Power BI report isn't in the repository yet; it will be added after it's cleaned up in Power BI Desktop.
| Folder | What it holds |
|---|---|
| slides | The talk deck as a PDF, with links to every Microsoft Learn path it cites |
| dataflow | The Dataflow Gen2 Power Query (M) script for every silver table |
| notebooks | The Spark notebook: SQL joins, anomaly flags, the gold write and Data Wrangler encoding |
The code (the Power Query script and the notebook) is under the MIT License. The slide deck is under Creative Commons Attribution 4.0 (CC BY 4.0), so you can share and adapt it if you credit Analytical Ants.
How do you rebuild it in your own workspace?
Start with a Fabric trial, then follow the same order as the talk. The repository's README has the same steps in more detail.
- Start a Microsoft Fabric trial and create a workspace on that capacity.
- Create a lakehouse named
FinancialModeling. The notebook's Spark SQL refers to that name. - Create a Dataflow Gen2, paste each query from the dataflow script and set each silver table's destination to the lakehouse.
- Import the notebook, attach it to the lakehouse and run it to write the gold general ledger.
- Build a pipeline that runs the dataflow, then the notebook.
- Build a Direct Lake semantic model on your gold and silver tables and report on it in Power BI. The talk's Power BI file will be added to the repository later.
What did the build teach us?
Most of the friction came from settings, not from the modeling. These notes reflect Fabric as it was in December 2023; check current Microsoft documentation before relying on any of them.
- Name tables without spaces. Lakehouse tables wouldn't accept spaces in names, so every silver and gold table uses underscores.
- Give a new table a minute. A table loaded from a dataflow sometimes showed as an unidentified object at first and resolved itself after a short wait.
- Plan the semantic model. The default lakehouse semantic model couldn't take calculated tables such as a DAX calendar. So the calendar came from the dataflow, and model edits needed XMLA read-write turned on in the admin settings.
- Use a recent tool for Direct Lake. XMLA work on a Direct Lake model needed SSMS 19.1 or later, or Tabular Editor 3.
Frequently Asked Questions
Is the data in the files real company data?
No. The general ledger and budgets come from our Randomized Retail GL Generator, which produces synthetic transactions for a fictional retailer, including seeded anomalies for practice. Workspace IDs, saved notebook outputs and account details are removed before the files are published. You can share and rebuild the files without exposing anyone's books.
Do I need a paid Fabric capacity to follow along?
The talk was built on a Fabric trial capacity in 2023, and that trial covered the lakehouse, Dataflow Gen2, notebooks, pipelines and the Direct Lake report. Trial availability and terms change over time, so check Microsoft's current trial page before you start.
Which parts of Fabric does the talk not cover?
It skips Data Activator, Real-Time Analytics, MLflow model training and batch predictions, and OneLake shortcuts. A closing slide links the Microsoft Learn material for each one, so you can continue from the same workspace.
If your team is weighing Fabric for finance reporting and wants a second opinion on the design, tell us about the work.
About the author: William Rodriguez is the founder of Analytical Ants. He wrote the Financial Modeling with Microsoft Business Intelligence series and presented this talk to the Atlanta Microsoft BI user group. More about Analytical Ants.