Logo: Organize Semantic Model

Organize Semantic Model

CommunautéitBeléift
data-goblin
organize-semantic-model

Organize a Power BI or Analysis Services semantic model end to end so it is ready for report authors, Excel users and Copilot - table groups, display folders, Title Case business names and naming conventions, hierarchies, sort-by columns, hiding, Analyze in Excel (IsAvailableInMDX), descriptions, format strings, data categories, context annotations, DAX formatting and UDFs, calculated-object justification, duplicate removal, perspectives, translations and security roles. Use whenever the user asks to "organize", "tidy", "clean up", "polish", "prepare", "standardize" or "make report-ready" a model or one table in it (for example "organize the date table"), to "fix naming conventions", "rename fields", "make names human readable" or "fix abbreviations", even when they name only one of these aspects, and whenever a model is driven through the Tabular Editor 3 MCP or the te CLI for that purpose. Not for DAX performance tuning (dax skill) or model design and star-schema changes (semantic-model skill).

Add to TypingMind

Iwwersiicht

Editeurdata-goblin
Repositorypower-bi-agentic-development
Skill-Nummorganize-semantic-model
Stären
1K
Forks
149
Matgeliwwert Dateien
2
LizenzGPL-3.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 2 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    data-goblin huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Organize Semantic Model an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/data-goblin/power-bi-agentic-development/tree/main/plugins/semantic-models/skills/organize-semantic-model
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/data-goblin/power-bi-agentic-development.git /tmp/power-bi-agentic-development
mkdir -p .claude/skills
cp -r /tmp/power-bi-agentic-development/plugins/semantic-models/skills/organize-semantic-model .claude/skills/organize-semantic-model
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Organize Semantic Model an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Organize Semantic Model automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Organize Semantic Model net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Organize a semantic model

[Workflow] Organizing is a set of passes over the same objects. Doing only one or two of them (folders and sorting, say) leaves the model looking finished while names, descriptions and formats are still raw, so run every pass unless the user narrows the scope, and say which passes were skipped and why.

Tooling

  • Tabular Editor 3 MCP: call get_workspace_info first and confirm the model title with the user if it is not the one they named. Read with get_model_overview and get_object_details; write with execute_csharp_script
  • te CLI (the te-cli skill) when there is no TE3 instance, for example against PBIP/TMDL on disk
  • One script per pass. Each execute_csharp_script call is one undo step and returns a property-level diff, so per-pass scripts keep every change reviewable and individually revertible
  • Read the returned diff after every script. Confirm each property you meant to set appears, and nothing you did not mean to touch. A property missing from the diff was already at that value, except annotations: the diff does not list annotation changes (TableGroup, context), so read those back with a second script
  • execute_dax_query only exists while the TE3 MCP server has model data read permission. If it disappears mid-session, the client's tool list is stale; reconnect the server (/mcp). A calculated table that was never recalculated returns no data until it is refreshed
  • Ask the user to close TE3 DAX editor tabs for objects a script will change. A script that edits an object while its editor is open and parsing has crashed TE3 (IndexOutOfRangeException in ScrollbarIndicatorsController)
  • Nothing is saved or deployed by the MCP. On a live connection, saving writes to the server, so leave saving to the user

Pass 0: inventory and lineage

Before changing anything:

  1. Record the starting state: tables, columns, measures, functions, existing display folders, table groups, hierarchies, cultures, perspectives, roles and annotations
  2. Find downstream consumers with the lineage-analysis skill (or fab through the fabric-cli skill): reports bound to the model in every workspace, and composite models on top of it. Renames, deletions and the Analyze in Excel pass all depend on this
  3. Note the cultures. Some TE operations write translated captions automatically (adding a hierarchy does), and renames leave existing translations pointing at the new object

Pass 1: table groups and display folders

  • Table groups: set table.TableGroup (stored as the TabularEditor_TableGroup annotation). Use role-based groups such as Facts, Dimensions, Measures, Calculation Groups, Parameters. Groups only show in Tabular Editor; they do not reach Power BI, which is why table names must not carry DIM_/FACT_ prefixes instead
  • Display folders: put every visible column and measure in a folder. Aim for 3 to 5 top-level folders per table. More than 5 means the table mixes subjects or the folders are too fine. Keep a larger existing structure if it predates the session; do not flatten the user's own work
  • Nest with / only (Keys/Technical); one level is usually enough
  • Folders on hidden objects are invisible to users. Set them so a later unhide lands somewhere sensible, but do not spend top-level folders on them

Pass 2: names

Title Case business names for tables, columns, measures and hierarchies (Order Date, Net Sales, Days of Supply), acronyms in capitals, no programming conventions, no technical prefixes, no unexplained abbreviations, and one consistent syntax for aggregations, units, periods and comparisons. The full rule set, the measure name construction order and the terminology questions to ask first are in references/naming-rules.md.

  • Conformed nomenclature: one concept, one word, everywhere. Customer Key, Customer, Cust for the same thing across tables collapse to one form; qualifiers that carry meaning (Billing Date, Order Date) stay. Pick singular or plural table names once
  • Calculated table columns bind to the expression's output through SourceColumn. Renaming the column object is enough while SourceColumn still matches an expression column; when the expression's names change, keep SourceColumn in step or the column is dropped on recalculation
  • Renaming in Tabular Editor carries relationships, sort-by columns, hierarchy levels, translations and perspective membership along, and renames a calculated table's partition with the table
  • Before renaming, show the user the old-to-new map and warn that renames break report visuals, filters, bookmarks and field parameters bound to the old names. Pass 0 found the consumers; offer to rebind them with the pbir-cli skill (local PBIR) or fabric-cli (service). Do not apply renames to a model with bound reports without that go-ahead. refactoring-renaming.md in the semantic-model skill has the full procedure

Pass 3: hierarchies

Add the natural drill paths: calendar (Year > Quarter > Month > Date), fiscal calendar if one exists, geography (Country > Region > City), product (Category > Subcategory > Product), organization. Skip a hierarchy whose levels are not truly nested.

Pass 4: sort order

Every text column with a non-alphabetical natural order gets a SortByColumn: month names by month number, month labels (Mar 2025) by a year-month key, weekday names by weekday number, statuses and buckets by an explicit order column. The sort key must have exactly one value per sort value, or refresh fails.

Pass 5: hiding

Hide what report authors should not drag into a visual: surrogate and foreign keys, sort keys, technical columns, and numeric fact columns meant to be aggregated only through a measure (hide them and make sure the measure exists). Hide tables that only support relationships or measures. Do not hide a column a hierarchy or visible slicer needs.

Pass 6: Analyze in Excel

IsAvailableInMDX = false removes a column's attribute hierarchy: less processing and memory, and the column disappears from Excel PivotTables and other MDX clients.

  • Candidates are the TE3 BPA rule TE3_BUILT_IN_SET_ISAVAILABLEINMDX_FALSE: hidden columns not used for sorting, in hierarchies, variations or calendars, without a sort-by column of their own, and not in a Direct Lake table. Run it with get_bpa_rule_results
  • Excel usage does not show up as a bound report. Check connected Excel workbooks in the lineage results and, with admin access, AnalyzedByExternalApplication events in the activity log. If Excel or other MDX use exists, tell the user which columns it would affect instead of disabling them silently

Pass 7: descriptions

Every visible table, column, measure, hierarchy and function gets a description unless the name and metadata already say everything. As few words as possible, as many as necessary: only what the name does not already say (format, an example value, grain, exclusions, unit or currency, an acronym spelled out, what a measure aggregates). Never restate what the metadata already shows: the name, object type, table, source column, data type, format string, sort-by column, hierarchy levels, relationships or calculated status. A description or annotation that adds nothing beyond those stays empty.

Write descriptions and context annotations about 80% of the way to ASD-STE100 Simplified Technical English: short sentences, one fact per sentence, simple common words, active voice and present tense, no Latin abbreviations (Example:, not e.g.). Leave field names, product names, codes and format patterns as they are. In descriptions, put two or more facts on separate lines as - bullets; one fact stays a single line.

  • Month Label: "Example: Mar 2025"
  • Month Sort: "- Format: YYYYMM\n- Example: 202503"
  • Net Sales: "Invoice value after discounts and returns.\n- Local currency\n- Does not include freight or taxes"

Pass 8: format strings

Format every visible measure and numeric column: separators, currency, percentage, decimals that match the data. Use a format string expression (FormatStringDefinition) when the format depends on context, such as the selected currency. Date formats are case-sensitive: MM is month and mm is minutes, so yyyy-MM-dd, never yyyy-mm-dd.

Pass 9: data categories

Set DataCategory where it changes client behavior: geography (Country, StateOrProvince, City, PostalCode, County, Continent, Latitude, Longitude, Place), WebUrl, ImageUrl, Barcode. The date table gets table-level DataCategory = "Time" and its date column IsKey = true.

Pass 10: context annotation

Add an annotation named context (obj.SetAnnotation("context", "...")) to objects whose purpose neither a reader nor the metadata reveals: role-playing keys, helper tables, columns that exist for RLS or a calculation group, disconnected parameter tables, anything kept for a downstream dependency. A sort key needs none; SortByColumn already says what it sorts. A few words in the pass 7 style on why it exists, for example "Kept for the Finance export; not used in reports."

Pass 11: calculated tables and columns

Each DAX calculated table and calculated column must justify itself in its context annotation, in one short sentence: why it is calculated in the model, why it must exist, and why it cannot come from the source (for example: derived from several fact tables at refresh time, depends on model relationships, or the source is a read-only view). If no reason holds, recommend moving it upstream rather than inventing one.

Pass 12: DAX code

  • Format every measure, calculated column, calculated table, calculation item and function expression. In a TE script, obj.FormatDax() formats at the end of the script
  • Prefix every variable with _ (VAR _StartDate) and every temporary column created by ADDCOLUMNS, ROW, SELECTCOLUMNS or SUMMARIZECOLUMNS with @ ("@BusinessDate", referenced as [@BusinessDate]), so neither can be mistaken for a model table or column
  • Apply TE3's code actions by hand. The editor shows them (DR001 to DR014, RW001 to RW003 on docs.tabulareditor.com/en/features/code-actions.html), but the MCP exposes neither the actions nor their lint markers, so an agent has to check for them: scalar predicates instead of FILTER on one column, aggregators instead of single-column iterators, VALUES instead of single-column SUMMARIZE, the two prefixes above, constant aggregations moved into variables, DISTINCTCOUNT, COALESCE, ISBLANK, IN instead of chained || equalities, no unused variables
  • Comment atypical logic inside the expression with one short // line: a deliberate ALL that removes a filter users might expect to apply, a workaround for an engine quirk, a magic number's meaning. Do not comment the obvious

Pass 13: user-defined functions

Look for logic repeated across measures that one UDF could carry, propose it with the measures it replaces, and on approval create it with a compound name, type hints, and /// plus parameter comments. Syntax, naming, documentation layers and worked examples are in references/udfs.md.

Pass 14: duplicates

A field that duplicates another (same values under a different name, a second copy of a key, an unused measure that repeats another's logic) can be deleted only if nothing uses it: no model dependency (ReferencedBy empty), no RLS or perspective reliance, and no report, Excel workbook or composite model in the pass 0 lineage. List deletions for the user before applying them.

Pass 15: perspectives, translations and roles

  • Perspectives: every perspective's membership is deliberate and current. New objects are excluded from existing perspectives by default, so add what belongs, and include the columns a visible measure needs
  • Translations: every culture covers every visible table, column, measure, hierarchy and display folder, with captions and descriptions. A partial culture shows users a mix of languages; report the gaps and fill them where the user can supply or approve the wording
  • Roles: if security roles exist, each has its table permissions and filter expressions set, members assigned where the model defines them, and object-level security consistent with what pass 5 hid. Do not create or loosen security without the user

Finish

  1. Run the BPA (get_bpa_rule_results) and fix what the passes introduced
  2. Run a small DAX query per changed table (execute_dax_query) to confirm sorting, formats and hierarchies behave
  3. Report per pass: what changed, what was already right, what was skipped and why, every rename and deletion with its downstream impact
  4. Tell the user the model is not saved, and that undo in TE3 is one Ctrl+Z per script

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Organize Semantic Model?

Organize a Power BI or Analysis Services semantic model end to end so it is ready for report authors, Excel users and Copilot - table groups, display folders, Title Case business names and naming conventions, hierarchies, sort-by columns, hiding, Analyze in Excel (IsAvailableInMDX), descriptions, format strings, data categories, context annotations, DAX formatting and UDFs, calculated-object justification, duplicate removal, perspectives, translations and security roles. Use whenever the user asks to "organize", "tidy", "clean up", "polish", "prepare", "standardize" or "make report-ready" a...

Firwat Organize Semantic Model op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Organize Semantic Model besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Organize Semantic Model an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/data-goblin/power-bi-agentic-development/tree/main/plugins/semantic-models/skills/organize-semantic-model an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Organize Semantic Model benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Organize Semantic Model benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Organize Semantic Model domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Organize Semantic Model gratis?

Jo. data-goblin huet de Skill ënner der Lizenz GPL-3.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇