Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
Working with Tabular Model Definition Language (TMDL) provides a powerful way to define and manage your Power BI semantic models through scripts. But before applying any script, especially one copied or adapted from another source, it's crucial to understand its potential impact.
That’s where the TMDL View Preview comes in.
In this blog, we’ll walk you through how TMDL preview works, how it helps you understand script changes before applying them, and what to keep in mind while using it.
The TMDL View Preview is a feature that allows you to see a side-by-side comparison of your semantic model before and after executing a TMDL script, shown as a TMDL code diff.
This preview provides an easy-to-read visual of what will change, helping you avoid mistakes and better understand the implications of script modifications, before you commit them to your semantic model.
Detailed Video: https://youtu.be/WobpB3ZR3L0?si=Hv3D7yvQwt4v_7n8
When working in the TMDL view and editing a script:
Click the Preview button located in the command bar.
A side-by-side comparison window appears in the right pane.
This feature is particularly helpful when you've pasted in scripts from documentation, blogs, or colleagues, and want to safely inspect what would be affected.
While the preview is incredibly useful, there are some technical aspects and limitations to understand:
The preview is not a literal diff of the code you wrote. Instead, it performs a full semantic model diff, based on how your script would change the model.
The preview is read-only. You can’t edit the model from the preview screen directly.
If you make changes to the script after previewing, you have to click on Update preview.
In the upper-right corner of the preview pane, there’s a toolbar to help you navigate the diff efficiently:
Toggle between inline or side-by-side view.
Show or hide unchanged regions.
Close the preview pane when done
.
This navigation flexibility helps you focus on what matters most, the parts of your model that will be impacted.
Keep these key points in mind:
The TMDL script preview feature is a must-use tool for anyone working with semantic models in Power BI using TMDL. It gives you the confidence and clarity needed to ensure that your changes are safe, correct, and as expected before execution.
Whether you’re experimenting with new model changes, reviewing scripts from peers, or maintaining an enterprise-grade model, this feature will save time and reduce risk.
Proud to be a Microsoft Fabric community super user
Let's Connect on LinkedIn
Subscribe to my YouTube channel for Microsoft Fabric and Power BI updates.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.