power-bi-model-review
Use this skill whenever the user shares a Power BI or Analysis Services semantic model (a TMDL export, a BIM/JSON model definition, or a pasted list of tables, relationships, and measures) and asks for a model review, a performance check, or help fixing DAX, before writing or correcting any DAX measure for that model.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 103
- Forks
- 119
01 前言 Front Matter
- name
- power-bi-model-review
- description
- Use this skill whenever the user shares a Power BI or Analysis Services semantic model (a TMDL export, a BIM/JSON model definition, or a pasted list of tables, relationships, and measures) and asks for a model review, a performance check, or help fixing DAX, before writing or correcting any DAX measure for that model.
02 资源文件 2
- 参考文档metadata.json544 B
- 参考文档README.md1.9 KB
03 SKILL.md 正文
Review the semantic model structure and DAX, report findings by category, and propose corrected DAX where relevant.
Instructions
-
Get the model definition. Accept a TMDL folder/export, a
.bim/JSON model definition, or a pasted description of tables, columns, relationships, and measures. If given only a screenshot or vague description, ask for the relationships and measure list directly. A review needs the actual expressions, not a summary of them. -
State this limit up front, in the first response: this is a static review of the model definition. It cannot connect to the live model, cannot see data volumes or cardinality, and cannot measure real query performance. Findings about likely performance impact are structural inference, not profiling results, so say so.
-
Check the model against each category below. Skip a category cleanly if the model doesn't contain what it checks (e.g. no bi-directional relationships to review).
-
Report findings grouped by category, worst-impact first:
Category Object Issue Fix Relationships Sales to Customer Bi-directional, both dimension tables Set to single-direction; use CROSSFILTER(..., BOTH)inside the one measure that needs itFor any DAX fix, show the corrected expression in full, not a diff.
-
On request, rewrite the flagged DAX or produce a prioritized backlog the user can hand to whoever maintains the model.
Review categories
Relationships
- Bi-directional relationships between two dimension tables, or wherever a
single-direction relationship plus a
CROSSFILTER(..., BOTH)inside the one measure that needs it would give the same answer with less filter-context ambiguity across the rest of the model. - Many-to-many relationships without a documented reason.
- Inactive relationships with no
USERELATIONSHIPreference anywhere in the model's measures. That's dead weight. - Missing or inconsistent relationship cardinality (e.g. many-to-many where one-to-many is intended).
Calculated columns that should be measures
- A calculated column doing row-by-row aggregation logic that a measure would compute at query time instead. It costs storage and compression for no benefit.
- A calculated column duplicating a value already derivable via a measure or a Power Query step upstream.
Date handling
- No dedicated date table, or a date table not marked as a date table.
- Time-intelligence functions (
TOTALYTD,SAMEPERIODLASTYEAR, etc.) applied against a column that isn't contiguous or isn't a proper date column. - Role-playing date scenarios (order date vs. ship date) handled by duplicating measures instead of duplicating the date table.
Naming and formatting
- Table, column, or measure names that are cryptic (
T1,CustNo,Amt) instead of self-explanatory. - Inconsistent data types for the same concept across tables (a date stored as text in one table, a real date in another).
- Missing or inconsistent format strings on the same kind of measure (currency, percentage).
- No descriptions on key measures. Harmless for report authors, but it also means Copilot in Power BI can't ground answers on that measure correctly.
Star schema shape
- Fact tables mixed with dimension attributes in the same table (snowflake or fully flat design where a star schema would simplify filtering).
- Missing surrogate keys or relationships built on unstable natural keys.
DAX correctness and clarity
CALCULATEwith filter arguments that silently override intended context.- Iterators (
SUMX,FILTER) used where a plain aggregation would do. - Division without
DIVIDE(), risking divide-by-zero errors. - Measures that reimplement logic another measure already provides. That's a correctness risk if the two drift.
Guardrails
- Never claim to have measured performance. Frame everything as "based on the model definition" or "typically causes."
- Never invent table row counts, data volumes, or refresh times not given by the user.
- Note whichever storage mode applies (Import, DirectQuery, Composite, Direct Lake) if it's stated or evident, since it changes what actually matters: a bi-directional relationship is cheap in one mode and expensive in another.
Tone
Direct, structural. State the issue, the why, and the fix. Skip the theory lecture unless asked.
04 同仓库更多 Skills
stakeholder-and-decision-map
Mines customer interactions to identify stakeholders, infer their likely roles and engagement, map the decision process, and highlight who or what may be missing. Use when asked to "map a deal's buying group", identify influential or missing stakeholders, "assess who has gone quiet", or "explain how the customer will decide". Do not use for phased engagement plans, contact sequences, choosing or drafting outreach to the single next contact, seller or team performance reviews, or contacting, scheduling, or changing records.
sales-progress-update
Creates or refreshes a sales progress update for a manager or team about work done, deal movement, pending outcomes, supported forecast position, and help needed. Use when asked to "create my weekly sales update", "refresh my sales progress deck", "report my forecast position", "where do I stand against my quarter forecast", or "catch my manager up on committed deals". Do NOT use for non-sales project updates, a since-date deal change digest, momentum or blocker analysis, meeting prep, or outreach drafting.
submission-assemble
Put the checked CSR or 510(k) sections together in template order with a reviewer-facing open-items register, as a draft package for human sign-off. Use when the user asks "assemble the CSR draft", "put the module together for review", "build the review package with the open items on top", "compile the 510(k) sections in order" or "package this up for the submission lead". Do NOT use for assembling an unchecked draft - use consistency-check instead. Do NOT use for loading protocol, SAP or TLF sources - use source-ingest instead. Do NOT use for compiling general documents or slide decks - use the built-in docx or pptx skill instead. Do NOT use for filing or submitting to a regulator - use the sponsor's validated gateway, operated by a human, instead. Guardrail: draft for human approval only (L1); status is draft_clean or draft_open_items, never submitted.
source-ingest
Pull every number, date and population definition out of a study's protocol, SAP, TLF tables, investigator brochure and prior approved text into one cited fact map, keyed per config/field-dictionary.json, before any CSR or 510(k) section is written. Use when the user asks "here's the locked TLF set and SAP, set up the CSR", "load the protocol and tables before we start drafting", "what figures do we have from the database lock?", "pull the disposition counts out of Table 14.1.1" or "ingest the IB for the 510(k)". Do NOT use for drafting or assembling submission sections - use section-draft or submission-assemble instead. Do NOT use for reconciling a patient's medications - use the discharge-care-transition plugin instead. Guardrail: reads and cites sources only; never estimates, rounds or invents a fact.
section-plan
Work out which sections a CSR or 510(k) requires, from the templates in config, check each one against the cited fact map, and name what is missing before a word is drafted. Use when the user asks "what do we still need before we can draft the CSR?", "which sections are ready to start?", "what's blocking the performance data section?", "do we have everything for the synopsis?" or "map our tables to the E3 structure". Do NOT use for writing section language - use section-draft instead. Do NOT use for cross-checking a finished draft - use consistency-check instead. Do NOT use for outlining general Word documents or business reports - use the built-in docx skill instead. Only structures with a template in config are supported. Guardrail: plans only; never marks a section ready on a missing fact and never invents a structure.
section-draft
Write or revise the language for one planned CSR or 510(k) section - synopsis, efficacy, safety, discussion, device description - using only figures already in the cited fact map, each with its TLF or SAP citation. Use when the user asks "draft the Synopsis from our locked tables", "write up safety from Table 14.3.1", "give me a first pass at the discussion", "draft the device description for the 510(k)" or "tighten the wording of the Discussion section". Do NOT use for supplying a number not already in source_facts - use source-ingest instead. Do NOT use for verifying a draft's figures - use consistency-check instead. Do NOT use for appeal letters, clinical notes or discharge summaries - use the matching HLS plugin instead. Guardrail: drafts for human approval only (L1); never asserts an unsourced number or harmonises two figures.