agentleFS
santoshkanthetysantoshkanthety/powerbi-agent/skills/powerbi-te-docs/SKILL.md

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.

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
  1. Very specific:

    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 …

    line 22

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Tabular Editor documentation lookup

Tabular Editor has two distributions and two doc sites; pick the right one before quoting features or syntax.

Distributions

TE2TE3
OriginOpen source (MIT)Commercial
Docs roothttps://docs.tabulareditor.com/te2/https://docs.tabulareditor.com/te3/
GitHubhttps://github.com/TabularEditor/TabularEditorclosed source
TOMWrapperhttps://github.com/TabularEditor/TOMWrappershared abstraction layer
Best fitCI, free scripting, BPA in pipelinesDaily authoring, DAX debugging, calculation-group editor, TMDL, advanced UX
CLITabularEditor.exeTabularEditor3.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

QuestionSectionURL
C# scripting recipe (e.g. "how do I bulk-add measures")Advanced Scriptinghttps://docs.tabulareditor.com/te2/Advanced-Scripting.html
Selected.Measures, Selected.Tables etc.Selection helpershttps://docs.tabulareditor.com/te2/Useful-script-snippets.html
BPA rule expressions (Expression, Severity)Best Practice Analyzerhttps://docs.tabulareditor.com/te2/Best-Practice-Analyzer.html
BPA standard rulesetMicrosoft Analysis Services GitHubhttps://github.com/microsoft/Analysis-Services/tree/master/BestPracticeRules
CLI flags (-D, -B, -S, -V)Command-linehttps://docs.tabulareditor.com/te2/Command-line-Options.html
TMSL deploy gotchas (PartitionTableMismatch etc.)Deploy & Savehttps://docs.tabulareditor.com/te2/Save-Options.html
Dynamic format stringsTE3 only — feature pagehttps://docs.tabulareditor.com/te3/dynamic-format-strings/
Calculation groupsboth, but TE3 has the editorhttps://docs.tabulareditor.com/te3/calculation-groups/
TOMWrapper API surface (Model, Table, Measure, Hierarchy …)inline IntelliSense + source on GitHubhttps://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") && !IsDateTable

CLI 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:

FlagEffect
-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
-OOverwrite existing database on deploy
-VVerbose 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, ImpersonationMode and other connection properties
  • Inspecting Database.Model.SerializeOptions before 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-rules skill — for authoring rule files
  • c-sharp-scripting skill — for executing scripts in TE2
  • te2-cli skill — for CLI invocation patterns from pbi-agent

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.