Mastering DAX and Tabular Editor Scripting for Power BI
The Power BI Journey with Bernat Agulló Roselló (MVP)
In the rapidly evolving world of data analytics, few professionals possess a journey as diverse and technically profound as Bernat Agulló Roselló. A Senior BI Developer at Esprinia and a Microsoft Data Platform MVP, Bernat has carved out a niche as a master of DAX (Data Analysis Expressions) and automation through Tabular Editor scripting. His story is not just one of technical expertise, but of global connection, spanning continents and languages to build a thriving data community.
In a recent discussion, Bernat shared insights into his transition from Excel macros to high-level Power BI development, the cultural nuances of the global BI community, and why mastering the fundamentals of DAX is non-negotiable for any serious developer. Whether you are a beginner struggling with filter context or an expert looking to automate your workflow, Bernat’s experience offers a roadmap for excellence in the Microsoft data stack.
A Global Perspective on the BI Community
Bernat’s technical prowess is matched by his linguistic versatility. Fluent in Catalan, Spanish, English, German, and Japanese, his ability to communicate across cultures has given him a unique perspective on how data communities thrive. Having lived in Japan for five years, he observed a distinct difference in how technical expertise is shared compared to the Western world.
“In Barcelona, we have more than 10 Data Platform MVPs. In all of Japan, there are maybe four,” Bernat notes. He attributes this to cultural differences in professional visibility. While Western cultures often encourage individuals to step into the spotlight and showcase their knowledge, other cultures may prioritize helping behind the scenes without seeking the “MVP” title. This global exposure eventually led him to present technical sessions in Japanese, a move that expanded his professional network and secured major international clients.
The Evolution from Excel to Business Intelligence
Like many veterans in the field, Bernat didn’t start his career with the title “BI Developer.” While working at Nissan, he spent his days building complex Excel macros to aggregate files and produce reports. It was only later, after reading The Data Warehouse Toolkit by Ralph Kimball, that he realized he had been practicing Business Intelligence all along.
This realization was a turning point. He began rebranding his experience through the lens of BI, moving through SQL Server Analysis Services (SSAS), Tableau, and eventually finding his home in Power BI. His background in Excel gave him a head start in understanding row-level logic, but it also presented a hurdle that many developers face: the “Excel mindset” can sometimes be a barrier to truly understanding DAX.
Mastering DAX: It’s All About the Model
The biggest misconception developers have about DAX is that it functions like Excel. Bernat is firm on this point: DAX is nothing without the data model. In Excel, you work with cells and ranges; in Power BI, you work with filter contexts and relationships.
The Learning Curve
Bernat admits that even with his background, he initially struggled to grasp the difference between calculated columns and measures. The breakthrough came from studying the work of Marco Russo and Alberto Ferrari (SQL BI). Their “Definitive Guide to DAX” became his manual for success.
The Power of CALCULATE
Understanding how the CALCULATE function modifies the filter context is the “aha!” moment for most developers. Bernat emphasizes that you cannot simply “Google your way” through DAX. To write elegant and performant code, you must invest time in learning the basics of modeling and the DAX engine. Without this foundation, developers often find themselves building “brittle” reports that break as data grows or requirements change.
Automation through Tabular Editor and C# Scripting
Once Bernat mastered the logic of DAX, he sought to replicate the flexibility he once had with Excel macros. This led him to Tabular Editor, a powerful tool for managing Power BI models outside of the standard Power BI Desktop interface. Specifically, he focused on C# scripting to automate repetitive tasks.
Bernat’s interest in automation peaked when he saw the potential of Calculation Groups. He realized that the mechanical nature of certain DAX patterns, such as Time Intelligence (YTD, MTD, YoY), made them perfect candidates for automation. By leveraging the Tabular Object Model (TOM) and C# scripts, he began building tools that could generate complex calculation groups instantly.
“I really wanted to replicate the power I had in Excel but for Power BI,” Bernat explains. This journey wasn’t easy; it required him to bridge the gap between being a BI developer and a software programmer, learning C# and the complexities of the Tabular Object Model simultaneously. Today, his scripts allow for the seamless integration of DAX Patterns into any model, saving hours of manual work and reducing the risk of human error.
Key Takeaways for Power BI Developers
Master the Fundamentals: Don’t skip the basics of data modeling and filter context. DAX logic is built on the structure of your data.
Adopt a Developer Mindset: Move beyond the “Excel way” of thinking. Focus on how measures aggregate across different dimensions rather than cell-by-cell calculations.
Leverage Community Resources: Follow industry leaders like SQL BI and explore community-driven tools like Tabular Editor.
Automate the Mundane: Use C# scripting in Tabular Editor to handle repetitive tasks like creating Time Intelligence measures or Calculation Groups.
Engage with the Community: Whether it’s attending user groups or presenting, sharing knowledge is the fastest way to grow your own expertise.
Conclusion
Bernat Agulló Roselló’s journey highlights a critical truth in the data industry: technical skill is only one part of the equation. The ability to adapt, learn from global perspectives, and embrace automation is what separates a standard developer from a Microsoft MVP. By moving from the familiar rows of Excel to the abstract power of DAX and C# scripting, Bernat has demonstrated that the most complex data challenges can be solved through structured learning and a commitment to the community.
For those looking to follow in his footsteps, the advice is clear: invest in the basics, embrace the tools of the trade, and never stop contributing to the collective knowledge of the data world.

