Calculation Groups & C# - The Perfect Couple
summary
Demonstrates how C# scripting in Tabular Editor generates measures from KPI columns, loops through 20–60 base measures and five calculation items, and writes per-item measures into display folders with descriptions so authors see base measure + calculation. Uses Power BI Desktop, Visual Studio Code and Tabular Editor, calls Model.Tables.*, creates measures via model.AddMeasure, saves the model and the new measures appear in Power BI — automation works and enforces naming, folders and reuse.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:13Agenda and BI stages
- 3:02Calculation groups and C# match
- 5:13Showcase problem with groups
- 7:25C# scripting in Power BI
- 10:41Model setup and first script
- 15:26Auto-creating measures with C#
- 19:41Saving and verifying measures
- 20:05Calculation groups basics
- 23:15Defining items in Tabular Editor
- 27:31Time intelligence items
- 29:03Combining C# and groups
- 29:44Automating measure creation
- 34:30Adding measure descriptions
- 36:59Summary and Q&A
related talks
48mCombine Power BI with External Tools
51mData modeling for experts with Power BI
43mBecome a Power BI Data Modeling Wizard using Tabular Editor 3
01h 08mAdvanced Modelling and Calculation Using the Power BI Designer
54mData Visualization with Power View and the Tabular Model
47mPower BI Meets Programmability – TOM, XMLA, and C#
20mRevolutionize reports with Fabric Copilot and Power BI
01h 05mDynamic Presentation Using Excel CUBE Formulas
