Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join now60 Days of Data Days! Live and on-demand sessions, challenges, study groups and more! And it's all FREE!. Join now. Learn more
I recently discovered something useful when working with multiple notebooks in Microsoft Fabric using the %run magic command.
When you try to load more than one notebook in the same cell like this:
You’ll get an error saying that no other code or commands can be combined with %run, and that no code can appear above or below the magic %run command in the same cell.
Even separating them with an empty line doesn’t work:
Result: Error – Fabric doesn’t allow multiple %run statements or any extra code in the same cell.
Solution:
Place each %run command in its own separate code cell.
Example:
After running both cells, you’ll have access to all functions, classes, and variables from both notebooks within your current notebook.
Each %run must be executed independently in its own cell — no other code should exist above or below it. Once both are run, their code is fully imported and available.
Hope this helps anyone integrating multiple shared notebooks (e.g., for logging, configuration, or utilities) in Fabric!
HI @Yazdan,
Checking in to see if your issue has been resolved. let us know if you still need any assistance.
Thank you.
Hi,
As you can see in my post, this is not a problem or issue — I just shared my finding and solution for running multiple %run commands.
Thank you.
HI @Yazdan,
Thank you so much for sharing this, This kind of post is incredibly valuable to the community. Definitely consider turning this into a blog post so others can benefit from your experience more easily
Power BI Community Blog - Microsoft Fabric Community
Thank you.
Hi @Yazdan,
Have you had a chance to review the solution we shared earlier? If the issue persists, feel free to reply so we can help further.
Thank you.
Hi,
As you can see in my post, this is not a problem or issue — I just shared my finding and solution for running multiple %run commands.
Thank you.
Hi @Yazdan,
Thank you for providing your insights. Kindly accept your response, as it will be beneficial to other community members.
Thank you.
Hi @Yazdan
%run command is used for Global Parameters in Microsoft Fabric or Equivalent to Databricks Delta Lake.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 18 | |
| 15 | |
| 15 | |
| 13 |