Skip to content
How-to guides

Fabric notebooks for Power BI people: a gentle introduction

Easy Insight Team ·

A Fabric notebook is a browser page of runnable cells where you write Python or SQL against data in OneLake and against your Power BI semantic models. For Power BI people it handles the jobs Power Query and DAX do badly: checking models in bulk, preparing large data and automating routine work. It needs a Fabric capacity, not just Pro.

If you have built reports in Power BI Desktop, a notebook can look like a step backwards: code instead of a ribbon. It is better to think of it as a new tool for jobs that sit around your reports, not as a replacement for them. Tabular Editor's introduction to notebooks for Power BI people puts it the same way: you don't need notebooks for everyday report work, but they let you do things at scale that the Power BI interface can't. This guide explains what a notebook is in Power BI terms, what you need before you can open one, and the first useful things to do with it. Every behaviour below was checked against Microsoft Learn as of November 2026.

What is a Fabric notebook, in Power BI terms?

A notebook is a single item in a Microsoft Fabric workspace, sitting next to your reports and semantic models. Inside it is a list of cells. A code cell holds a few lines of code and shows its result straight underneath: a table, a chart, a number or an error. A Markdown cell holds notes, headings and explanations. You run cells one at a time or all at once, top to bottom.

The nearest Power BI comparison is the Applied Steps pane in Power Query: a sequence of small steps, each building on the last, that you can inspect as you go. The difference is that each step is code you can read, copy, put under version control and run on a schedule, and the steps can do much more than load and shape a table.

According to Microsoft's guide to developing and running notebooks, Spark notebooks support PySpark (Python), Spark SQL, Scala and SparkR. There is also a lighter pure Python notebook, covered below. Notebooks autosave by default, several people can edit one at the same time, and you can leave cell-level comments that tag a colleague, who then gets an email (How to use notebooks).

What do you need before you can open one?

This is where most Power BI teams stop, so it is worth being precise. Microsoft's Fabric licences page (updated November 2026) treats notebooks as non-Power BI Fabric items. They need a workspace on an F capacity or a Fabric trial capacity. A workspace with only Power BI Pro licences cannot create them, and Premium Per User does not help, because PPU gives you features, not a capacity. Our Power BI licensing guide covers that distinction in full.

You also need at least the Contributor role in the workspace where the notebook will live. To point a notebook at a semantic model you need Build permission on that model (Use notebooks with a semantic model).

If you want to try before paying, Microsoft's Fabric trial is free for 60 days as of November 2026, runs as an F4 or F64 capacity and includes notebooks and pipelines. It is meant for evaluation, not production, and when it ends the notebooks become inactive unless you move the workspace to a paid capacity within seven days.

On a paid capacity there is no separate charge per notebook. A running notebook uses the capacity's compute units: Microsoft's Spark compute page says two Spark vCores equal one capacity unit and you are billed for active session time only. For what a capacity costs in pounds, see our Microsoft Fabric pricing guide.

Spark or pure Python: which notebook should you pick?

Fabric offers two kinds of notebook, chosen from the language drop-down on the Home tab.

Pure Python notebook Spark notebook
Compute One node, 2 vCores and 16 GB memory by default A Spark pool (starter pools use Medium nodes)
Start-up time Up to three minutes if no warm session is available Typically 5 to 10 seconds on a starter pool with no extra libraries; 2 to 5 minutes otherwise
Good for Small and medium tables, quick analysis, semantic model checks Large data, Spark SQL, multi-table transformations
Libraries named by Microsoft DuckDB, Polars, scikit-learn, delta-rs, semantic link The Fabric Spark runtime, including semantic link from Spark 3.4

Figures from Microsoft Learn's Python notebook and Spark compute pages, as of November 2026.

Our view, for a typical SME: start with the pure Python notebook. Most SME tables run to thousands or a few million rows, which a single node handles comfortably and more cheaply than a Spark cluster. Move to Spark when the data outgrows one machine or when a tutorial you are following assumes it.

How do you create your first notebook?

  1. Open a workspace that sits on a Fabric or trial capacity.
  2. Choose New item, then Notebook. You can also import an existing .ipynb file.
  3. In the Lakehouse explorer on the left, add a lakehouse. Pinning it as the default lets your code read its files with simple local paths. If you change the default later, restart the session.
  4. Type a line of code into the first cell and run it. The first run starts a session, so expect a short wait.
  5. Add a Markdown cell above it saying what the notebook is for. A future colleague will thank you.

If you don't have a lakehouse yet, our explainer on what a data lakehouse is shows where one fits. You don't need one to work with semantic models, though: the next section works without it.

What can a notebook do with your semantic model?

This is the part that makes notebooks worth learning for Power BI people, and it needs no lakehouse at all. Semantic link is a Python library that connects a notebook to the semantic models you already publish. Microsoft's semantic link guide lists the core calls:

import sempy.fabric as fabric

fabric.list_datasets()                      # every semantic model in the workspace
fabric.list_measures("Sales")               # every measure in the Sales model
fabric.evaluate_measure(
    "Sales", "Total Revenue",
    groupby_columns=["Date[Year]"]
)                                           # a measure, grouped like a table visual

There is also fabric.evaluate_dax to run any DAX query and return the result as a table, and a %%dax cell magic that lets you write DAX directly in a cell. fabric.read_table and evaluate_dax connect through the XMLA endpoint, so XMLA read access needs to be enabled for them to work.

You don't even have to write that code to get value on day one. In the Power BI service, open a semantic model and look under Model health on its details page, or on the Home ribbon while editing the model, for Microsoft's ready-made notebooks:

  • Best Practice Analyzer checks the model against more than 60 rules in five categories and lists what to fix.
  • Model Memory Analyzer shows how much memory each table, column, partition and relationship uses, which is usually the quickest way to find out why a model is slow or large.

Both run without edits. If memory turns out to be the problem, our guide to Power BI performance tuning covers the fixes. For more than the built-in functions, Microsoft points to the open-source Semantic Link Labs library, which adds bulk model management.

When should you use a notebook instead of Power Query or a dataflow?

Power Query is still the right tool for most data loading in Power BI. Our view is that a notebook earns its place in five situations:

  • Checking many models at once. Running the Best Practice Analyzer over every model in a workspace, or listing every measure that references a retired column, is a loop in a notebook and an afternoon of clicking without one.
  • Testing numbers. evaluate_measure lets you compare a measure's result with a finance export every morning and flag differences, before a director spots them in a meeting.
  • Heavy preparation in the lake. If you are moving reports to Direct Lake, data preparation has to happen in the lakehouse or warehouse, and notebooks are one of the main tools for it.
  • Logic Power Query can't express cleanly. Forecasting, fuzzy matching or calling an API in a loop are ordinary Python tasks.
  • Replacing script visuals. Microsoft is retiring Power BI's R and Python visuals in May 2027, and a notebook is one of the places that analysis can move to.

If the job is "load these five tables and tidy the columns", a Dataflow Gen2 or Power Query in Desktop is simpler to maintain, and anyone on the team can read it. Our Dataflow Gen1 to Gen2 migration guide covers that route.

How do you run a notebook on a schedule?

There are two routes. The pure Python notebook has a lightweight schedule on its settings page. For anything that has to run in order with other steps, use a Data pipeline: Microsoft's notebook activity page shows how to add the notebook as an activity, pass values to it through a parameters cell (the names must match exactly) and then run or schedule the pipeline from its Home tab.

One detail that catches people out: Microsoft says a scheduled notebook runs under the identity of the person who created or last updated the schedule, and a pipeline runs as the last person to edit it. If that person leaves and their account is disabled, the job fails. Agree who owns scheduled jobs before you set them up.

What are the common first-week mistakes?

These are our observations rather than Microsoft's, but each one follows from the documented behaviour above:

  • Leaving sessions running. An active session consumes capacity. The default timeout is 20 minutes, but on a small F2 or F4 capacity that is enough to slow other work. Stop the session when you have finished.
  • Forgetting the default lakehouse. Code that reads a relative path fails if no lakehouse is pinned, or quietly reads the wrong one if a different lakehouse is pinned.
  • Model names ending in a space. Microsoft notes that its semantic model notebooks fail to run if the model's name ends with a space. Rename the model.
  • Writing code nobody can read. A notebook with no Markdown cells is as hard to hand over as a 200-step Power Query. Write a sentence above each block saying what it does.

If you'd like a second pair of eyes before you put notebooks into production, or someone to build the first automated model checks with your team, that is the work our Power BI and Fabric consultancy and data engineering teams do. See all our data services.

Frequently asked questions

Can I use Fabric notebooks with a Power BI Pro licence?

Not on Pro alone. Microsoft's Fabric licensing page says a workspace with only Pro licences and no F or P capacity cannot create Fabric items such as notebooks, and Premium Per User does not provide a capacity either. You need the workspace on an F capacity or a Fabric trial capacity.

Do I need to know Python to use a Fabric notebook?

Not to get started. Microsoft's sample notebooks for semantic models, the Best Practice Analyzer and the Model Memory Analyzer, run as provided, and Spark SQL cells let anyone who knows SQL query lakehouse tables. Basic Python pays off quickly once you want to automate checks or reshape data.

What is semantic link in Microsoft Fabric?

Semantic link is a Python library, imported as sempy, that connects a Fabric notebook to Power BI semantic models. It can list models, tables and measures, evaluate a measure, run a DAX query and write results to a lakehouse table. On Spark 3.4 and later it is preinstalled, so there is nothing to set up.

Do Fabric notebooks cost extra?

There is no separate notebook licence. A running notebook consumes capacity units from the workspace's Fabric capacity, billed for active session time only, at two Spark vCores to one capacity unit. A heavy notebook can therefore slow other work on a small capacity, so stop sessions you have finished with.

Should I use a Spark notebook or a Python notebook?

Start with the pure Python notebook for small and medium data: it runs on one small node (2 vCores and 16 GB of memory by default) and includes libraries such as DuckDB and Polars. Choose a Spark notebook when data is large, when you need Spark SQL, or when a tutorial is written for Spark.


Easy Insight is a UK consultancy for AI, web, apps and data — senior specialists only, no juniors.

Next step

Want a number before you talk to anyone?

The free Power BI & Fabric Pricing Estimator gives you a first-pass licensing cost in two minutes, and it doesn't ask for an email. When you're ready, a free data review is one call with the consultant who would deliver it; EasyStart Power BI builds are fixed from £4,950.

Keep reading