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
In today’s blog, we’ll explore a powerful and time-saving feature in Power BI Desktop: creating multiple measures at once using the TMDL view.
If you work with large datasets or enterprise-level reports, then this trick will definitely boost your productivity.
Creating measures in Power BI manually one by one can be time-consuming, especially in large datasets or complex models. For example, if you’re building a report that requires 10+ similar measures, switching to the DAX editor for each one can feel repetitive and slow.
Problem with Traditional Method:
Solution: Use TMDL (Tabular Model Definition Language) View to create multiple measures in one go!
TMDL is a new feature in Power BI Desktop that lets you edit model metadata (like measures, calculated columns, relationships, etc.) using a simple code editor. It’s like having access to the back-end definition of your model, making it much easier to bulk create or edit logic.
Open TMDL View in Power BI Desktop
Locate Your Measure Table
Create One Measure as a Template
measure Demo_Measure1 = 1
Add Multiple Measures
measure Demo_Measure2 = 2
measure Demo_Measure3 = 3
measure Total_Sales = CALCULATE(SUM(Sales[Amount]))
⚠️ Note:
Spaces in measure names are not yet supported in TMDL, so use underscores (_) instead.
Click on the “Apply” Button
Let’s say you need to calculate sales by categories (e.g., Electronics, Clothing, Furniture). Just create the logic for one:
measure Sales_Electronics = CALCULATE(SUM(Sales[Amount]), FILTER(Sales, Sales[Category] = "Electronics"))
Then copy-paste and change the category name accordingly. Apply the changes, and you’re done!
This method can save a lot of time, especially in enterprise-scale projects or when building demo reports with repeated logic. It’s a great example of how Power BI continues to evolve and empower developers with flexible and efficient tools.
Regards
Anmol Malviya
Sr. Data Analyst | Addend Analytics
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.