powerbi-te-docs
Skill3 starsChanged 7 months agoMITView on GitHub
Look up Tabular Editor (TE2 / TE3) documentation — C# scripting cookbook, BPA rule reference, CLI flags, dynamic format strings, calculation groups, TOM/TMSL APIs. Automatically invoke when the user asks about a Tabular Editor feature, scripting recipe, BPA rule, CLI flag, calculation group syntax, dynamic format string, or quotes a TE error message; or mentions Tabular Editor, TE2, TE3, ScriptHelper, Model.Tables, Selected.Measures, or TOMWrapper.
In this repository58 other files it gives its agents.
- powerbi-audit-tenant-settingsSkill
- powerbi-bpa-rulesSkill
- powerbi-connect-pbidSkill
- powerbi-connectSkill
- powerbi-create-pbi-reportSkill
- powerbi-c-sharp-scriptingSkill
- powerbi-custom-visualsSkill
- powerbi-cyber-securitySkill
- powerbi-data-catalog-lineageSkill
- powerbi-data-governance-traceabilitySkill
- powerbi-data-transformationSkill
- powerbi-dax-masterySkill
- powerbi-dax-performanceSkill
- powerbi-daxSkill
- powerbi-deneb-visualsSkill
- powerbi-doctorSkill
- powerbi-duckdb-lakehouseSkill
- powerbi-fabric-appsSkill
- powerbi-fabric-app-templatesSkill
- powerbi-fabric-capacitySkill
- powerbi-fabric-cliSkill
- powerbi-fabric-pipelinesSkill
- powerbi-fabricSkill
- powerbi-lineage-analysisSkill
- powerbi-measure-glossarySkill
- powerbi-medallion-architectureSkill
- powerbi-modelSkill
- powerbi-modifying-theme-jsonSkill
- powerbi-paginated-reportsSkill
- powerbi-pbi-cliSkill
- powerbi-pbip-formatSkill
- powerbi-pbir-cliSkill
- powerbi-pbir-format-enhancedSkill
- powerbi-performance-scaleSkill
- powerbi-power-querySkill
- powerbi-project-managementSkill
- powerbi-python-visualsSkill
- powerbi-refresh-semantic-modelSkill
- powerbi-report-authoringSkill
- powerbi-report-conversionSkill
- powerbi-report-designSkill
- powerbi-reportSkill
- powerbi-report-structureSkill
- powerbi-report-themingSkill
- powerbi-review-reportSkill
- powerbi-review-semantic-modelSkill
- powerbi-r-visualsSkill
- powerbi-security-rlsSkill
- powerbi-source-integrationSkill
- powerbi-spark-livySkill
- powerbi-standardize-naming-conventionsSkill
- powerbi-star-schema-modelingSkill
- powerbi-svg-visualsSkill
- powerbi-te2-cliSkill
- powerbi-te-cliSkill
- powerbi-testing-validationSkill
- powerbi-time-series-dataSkill
- powerbi-tmdlSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
If the user runs te2-cli or invokes pbi-agent skills that shell out to the CLI, default to TE2 unless they specify TE3 — TE2 is what we …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tabular Editor documentation lookup
Tabular Editor has two distributions and two doc sites; pick the right one before quoting features or syntax.
Distributions
| TE2 | TE3 | |
| Origin | Open source (MIT) | Commercial |
| Docs root | https://docs.tabulareditor.com/te2/ | https://docs.tabulareditor.com/te3/ |
| GitHub | https://github.com/TabularEditor/TabularEditor | closed source |
| TOMWrapper | https://github.com/TabularEditor/TOMWrapper | shared abstraction layer |
| Best fit | CI, free scripting, BPA in pipelines | Daily authoring, DAX debugging, calculation-group editor, TMDL, advanced UX |
| CLI | TabularEditor.exe | TabularEditor3.exe |
If the user runs te2-cli or invokes pbi-agent skills that shell out to the CLI, default to TE2 unless they specify TE3 — TE2 is what we install and what runs in CI.
Where to look up what
| Question | Section | URL |
| C# scripting recipe (e.g. "how do I bulk-add measures") | Advanced Scripting | https://docs.tabulareditor.com/te2/Advanced-Scripting.html |
Selected.Measures, Selected.Tables etc. | Selection helpers | https://docs.tabulareditor.com/te2/Useful-script-snippets.html |
BPA rule expressions (Expression, Severity) | Best Practice Analyzer | https://docs.tabulareditor.com/te2/Best-Practice-Analyzer.html |
| BPA standard ruleset | Microsoft Analysis Services GitHub | https://github.com/microsoft/Analysis-Services/tree/master/BestPracticeRules |
CLI flags (-D, -B, -S, -V) | Command-line | https://docs.tabulareditor.com/te2/Command-line-Options.html |
| TMSL deploy gotchas (PartitionTableMismatch etc.) | Deploy & Save | https://docs.tabulareditor.com/te2/Save-Options.html |
| Dynamic format strings | TE3 only — feature page | https://docs.tabulareditor.com/te3/dynamic-format-strings/ |
| Calculation groups | both, but TE3 has the editor | https://docs.tabulareditor.com/te3/calculation-groups/ |
TOMWrapper API surface (Model, Table, Measure, Hierarchy …) | inline IntelliSense + source on GitHub | https://github.com/TabularEditor/TOMWrapper/tree/master/TOMWrapper |
Common scripting recipes
// Bulk-create measures from a list of (name, expression) pairs
var pairs = new[] {
new { Name = "Total Sales", Expr = "SUM('Sales'[Amount])" },
new { Name = "Total Qty", Expr = "SUM('Sales'[Quantity])" },
};
foreach (var p in pairs) {
var m = Model.Tables["Sales"].AddMeasure(p.Name, p.Expr);
m.FormatString = "#,0.00";
m.DisplayFolder = "Core";
}// Apply a measure prefix to all measures in a table
foreach (var m in Model.Tables["Sales"].Measures) {
if (!m.Name.StartsWith("[fact] "))
m.Name = "[fact] " + m.Name;
}// Hide all FK columns (named "*Key" or "*ID") on dim tables
foreach (var t in Model.Tables.Where(x => x.Name.StartsWith("dim"))) {
foreach (var c in t.Columns.Where(c => c.Name.EndsWith("Key") || c.Name.EndsWith("ID")))
c.IsHidden = true;
}Common BPA expression idioms
// Measures must have a format string
Measure: string.IsNullOrWhiteSpace(FormatString)
// Tables must not be hidden if they have visible measures
Table: !IsHidden && Measures.Any(m => !m.IsHidden) && Columns.All(c => c.IsHidden)
// Date table must have IsDateTable flag
Table: Name.ToLower().Contains("date") && !IsDateTableCLI batch deploy pattern
TabularEditor.exe `
"model.bim" `
-D "Provider=MSOLAP;Data Source=powerbi://api.powerbi.com/v1.0/myorg/MyWorkspace;Initial Catalog=MyModel" `
"MyModel" `
-O `
-B "rules.json"Flags worth knowing:
| Flag | Effect |
-D <conn> <db> | Deploy to AS / Power BI |
-B <bpa.json> | Run BPA against the supplied ruleset before deploy |
-S <script.csx> | Run a C# script |
-O | Overwrite existing database on deploy |
-V | Verbose log to stdout |
-T <output> | TMSL output file (for review/CI artifacts) |
When to escalate to TOM directly
TOMWrapper covers ~95% of model operations. Drop to raw TOM (Microsoft.AnalysisServices.Tabular) when:
- Tweaking annotations not surfaced by the wrapper
- Reading
RequestedTimeout,ImpersonationModeand other connection properties - Inspecting
Database.Model.SerializeOptionsbefore TMSL export - Iterating refresh policy partition templates
For TOM reference, the canonical source is the SDK: https://learn.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.tabular.
Pairs well with
bpa-rulesskill — for authoring rule filesc-sharp-scriptingskill — for executing scripts in TE2te2-cliskill — for CLI invocation patterns frompbi-agent
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

