The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
The recent introduction of TMDL (Tabular Model Definition Language) in Power BI represents one of the most significant advancements in the platform's history, bridging the gap between user-friendly BI tools and professional data development. This new feature is set to revolutionize how we approach data modeling in Power BI, offering powerful capabilities for both analyzing existing models and creating new ones from scratch.
fabric, TMDL, Power BI
TMDL is a definition language used to define objects within a Tabular Analysis Services model, which forms the underlying technology in Microsoft Power BI. While it theoretically can define any element within the semantic model, the current preview version supports a specific set of modeling changes, with more capabilities expected in future releases.
fabric, TMDL, Power BI
One of the most immediate benefits of TMDL is the ability to view and edit all measures in a single screen. This addresses a common pain point where developers had to click through measures one by one, making it difficult to get a comprehensive view of their metric definitions. With TMDL, you can simply drag your measures table into the code window and see all measures at once.
TMDL enables rapid implementation of best practices when setting up new reports. Instead of manually creating measure tables and basic structures through the Power Query interface, you can use TMDL scripts to:
- Create dedicated measure tables
- Set up UI measure containers
- Establish basic partitioning
- Create placeholder measures
The real power lies in how quickly these changes can be implemented - what might have taken several minutes through the traditional interface can be accomplished in seconds with TMDL.
fabric, TMDL, Power BI
Several key aspects of TMDL syntax are worth noting:
1. Spacing Matters: Similar to Python, TMDL is whitespace-dependent. Proper indentation is crucial for defining hierarchical relationships between elements.
2. Multi-line Measures: When writing measures that span multiple lines, you'll need to use either triple backticks or double quotes to indicate the continuation.
3. Machine vs. Human Code: Power BI-generated TMDL includes additional details that human-written code might not, such as:
- Lineage tags
- Data access settings
- Annotations
- System-generated IDs
fabric, TMDL, Power BI
One of TMDL's most impressive features is its ability to enhance human-written code. When you execute basic TMDL scripts, Power BI automatically adds necessary system elements like lineage tags, data access settings, and annotations. This means you can focus on writing clean, simple code while Power BI handles the technical details behind the scenes.
fabric, TMDL, Power BI
The introduction of TMDL marks a significant step forward in Power BI's evolution. As the community becomes more familiar with this feature, we can expect to see:
- Innovative use cases emerging from power users
- More efficient workflows for data modeling
- Better integration between traditional BI work and professional data development
- Increased automation possibilities for repetitive modeling tasks
To begin using TMDL in Power BI:
1. Simply drag objects from your semantic model into the code window
2. Experiment with viewing and editing existing measures
3. Try creating basic scripts for new model setup
4. Remember that this is a preview feature, so some functionality may be limited
Conclusion
TMDL represents a significant leap forward in Power BI's capabilities, offering new possibilities for both basic and advanced users. As the feature matures and the community develops more use cases, TMDL is likely to become an essential tool in the Power BI developer's arsenal, fundamentally changing how we approach data modeling and measure management.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.