Claude Prompt Library

Claude Prompts for Power BI

35 copy-paste prompts

Claude does not run inside Power BI Desktop, and these prompts never pretend it does. You paste a table list, a broken measure, an error message or a CSV export, and Claude hands back DAX, M code, a model fix or a written insight you paste straight back into your report.

In short: This page contains 35 copy-paste ready prompts, organized into 5 categories with a description and pro tip for each. The first 5 prompts are free instantly, no signup needed. Hand-curated and tested by the AI Academy team.

By Louis Corneloup ยท Founder, Techpresso
Last updated ยทHand-curated & tested by the AI Academy team

DAX Measures & Formulas

7 prompts

Measure From a Plain English Ask

1/35

You are a DAX developer. Write a measure from a business question. I will give you the model shape, since you cannot see my file. <context>Tables and the columns that matter: [PASTE TABLE AND COLUMN NAMES, WITH DATA TYPES]. Relationships between them: [FACT TO DIM, DIRECTION, CARDINALITY]. The business question: [QUESTION IN PLAIN ENGLISH]. Filters that must always apply: [FILTERS]. Filters the user controls on the page: [SLICERS].</context> <task>Write the measure, then explain in three lines what filter context it assumes and where it will break.</task> <constraints>Use DIVIDE instead of the slash operator. Name variables clearly with VAR. Follow the naming convention [CONVENTION]. Do not invent columns that are not in my list.</constraints> <format>The DAX in a code block ready to paste into a new measure, then Assumptions and Breaks when as short bullet lists.</format>

A paste-ready DAX measure plus an honest note on the filter context it assumes.

๐Ÿ’ก

Pro tip: Paste your column names exactly as they appear in the Fields pane, brackets and spaces included. Claude cannot see the model, so a renamed column is the single most common cause of a formula that will not commit.

Time Intelligence Measure Set

2/35

You are writing a complete time intelligence set for one base measure so the report answers every period question. <context>Base measure name and its DAX: [PASTE THE MEASURE]. Date table name and its key column: [DATE TABLE]. Is it marked as a date table in the model: [YES / NO]. Fiscal year start month: [MONTH]. Granularity available: [DAY / WEEK / MONTH].</context> <task>Write measures for year to date, prior year, year over year change and percent, month over month, and rolling 12 months, all built on the base measure.</task> <constraints>Never duplicate the base logic, always reference the base measure. Respect the fiscal calendar. Flag any measure that needs the date table marked before it will work.</constraints> <format>One code block per measure with its name as a comment, then a short list of the ones that require a marked date table.</format>

A full year to date, prior year and rolling set built on one base measure.

๐Ÿ’ก

Pro tip: Time intelligence functions need a continuous date table marked with Table tools, Mark as date table. Without it, prior-year measures return blanks that look like missing data.

Debug a Measure Returning the Wrong Number

3/35

You are debugging DAX that runs but returns the wrong result. I will paste the measure and what I expected. <context>[PASTE THE MEASURE DAX]. What it returns: [ACTUAL VALUE OR PATTERN]. What it should return: [EXPECTED]. Where it goes wrong: [ONLY IN TOTALS / ONLY WITH A SLICER / EVERY ROW]. Model shape: [RELEVANT TABLES, RELATIONSHIPS, FILTER DIRECTIONS].</context> <task>Diagnose the cause, name the specific DAX behaviour responsible, and give the corrected measure.</task> <constraints>Check the usual suspects in order: totals evaluated in a different filter context, CALCULATE overwriting filters, missing rows in a dimension, inactive relationships, and text values counted as blanks. Explain the cause before showing the fix.</constraints> <format>Diagnosis in three lines, the corrected DAX in a code block, then one test I can run in a matrix visual to confirm the fix.</format>

A named cause for a wrong-number measure, the corrected DAX, and a test to prove it.

๐Ÿ’ก

Pro tip: Say whether the number is wrong only in the total row. A wrong total with correct rows almost always means the measure is not summing rows, and Claude can jump straight to the fix.

Filter Context Explainer

4/35

You are explaining what a piece of DAX actually does to filter context, line by line, so I can maintain it. <context>[PASTE THE MEASURE, IDEALLY ONE SOMEONE ELSE WROTE]. Where it is used: [VISUAL TYPE, ROWS, COLUMNS, SLICERS]. Model shape: [TABLES AND RELATIONSHIPS].</context> <task>Walk through the evaluation: what filter context arrives from the visual, what each CALCULATE, FILTER, ALL or REMOVEFILTERS does to it, and what the final expression is evaluated against.</task> <constraints>Plain English, no theory dump. Name the exact function doing each transformation. End with the one line that most people misread.</constraints> <format>A numbered walkthrough matched to the lines of DAX, then a two-line plain summary I could give a colleague.</format>

A line-by-line reading of what an inherited measure does to filter context.

๐Ÿ’ก

Pro tip: Run this on any measure you inherited before you edit it. Most DAX regressions come from changing a CALCULATE filter without knowing what it was protecting against.

Rewrite a Slow Measure

5/35

You are optimizing DAX that is correct but slow. I will paste the measure and the timings. <context>[PASTE THE MEASURE DAX]. Visual it feeds: [VISUAL TYPE AND ROW COUNT]. Timing from Performance Analyzer: [MS]. Fact table row count: [ROWS]. Cardinality of the columns it touches: [ESTIMATES]. Anything already tried: [ATTEMPTS].</context> <task>Identify what is forcing row-by-row evaluation, rewrite the measure to push work into the storage engine, and state the expected effect.</task> <constraints>Look for iterators over the fact table, nested FILTER over a whole table, repeated subexpressions that should be VAR, and unnecessary context transitions. Keep the result numerically identical and say so explicitly if a rewrite changes edge-case behaviour.</constraints> <format>Cause, rewritten DAX in a code block, expected improvement, and what to re-check in Performance Analyzer.</format>

A storage-engine friendly rewrite of a slow measure, with the cause named.

๐Ÿ’ก

Pro tip: In Power BI Desktop use View, Performance analyzer, then Copy query on the slow visual. Pasting that generated DAX query alongside your measure gives Claude the real workload rather than your guess at it.

Dynamic Titles and Labels

6/35

You are writing measures that generate the text shown in visual titles and cards, so the report explains its own filters. <context>Slicers on the page and their columns: [SLICERS]. Date table and column: [DATE TABLE]. What the title should say when nothing is selected: [DEFAULT TEXT]. When one item is selected: [PATTERN]. When several are: [PATTERN]. Locale and date format: [FORMAT].</context> <task>Write the measures that build these title strings, handling the no-selection, single-selection and multi-selection cases.</task> <constraints>Use SELECTEDVALUE with a fallback, ISFILTERED and CONCATENATEX where needed. Cap long lists at three items plus a count. Keep the string readable when everything is selected.</constraints> <format>One code block per title measure, plus one line on where to bind it under Format, Title, Conditional formatting.</format>

Title measures that state the active filters instead of leaving a static heading.

๐Ÿ’ก

Pro tip: Bind the measure under Format, Title, then the fx button next to Text. Exported screenshots of the report then carry their own filter context, which kills a lot of back and forth.

Ranking and Top N Measure

7/35

You are writing ranking DAX that behaves correctly in totals and with slicers. I will describe the requirement. <context>What is being ranked: [PRODUCTS / REPS / STORES] from table [TABLE]. Ranked by measure: [MEASURE NAME AND DAX]. Ties should: [SHARE A RANK / BREAK BY SECOND MEASURE]. Ranking scope: [WITHIN CURRENT FILTERS / ACROSS ALL DATA]. Do I need an Other bucket for everything outside the top N: [YES / NO].</context> <task>Write the ranking measure, a top N filter measure, and if requested an Other aggregation that still sums to the correct grand total.</task> <constraints>Use RANKX with the right ALL or ALLSELECTED scope for the stated requirement. Make the total row correct, not blank or repeated. State how ties are handled.</constraints> <format>Code blocks per measure, then a two-line note on what changes when the user slices.</format>

Ranking, top N and Other measures that survive totals and slicer changes.

๐Ÿ’ก

Pro tip: Tell Claude whether the rank should follow the slicers. ALLSELECTED ranks within the user selection while ALL ranks across everything, and picking the wrong one is the classic ranking bug.

XML tags are just the start. Learn the full Claude workflow.

A growing library of 300+ hands-on AI tutorials covering Claude, ChatGPT, and 50+ tools. New tutorials added every week.

Start 7-Day Free Trial

Data Modeling & Relationships

7 prompts

Star Schema From a Table List

8/35

You are turning a pile of imported tables into a star schema. I will paste the inventory. <context>[PASTE EVERY TABLE NAME WITH ITS COLUMNS AND ROW COUNT]. Where the data comes from: [SOURCES]. Questions the report must answer: [QUESTIONS]. Grain I care about: [TRANSACTION / DAILY / MONTHLY].</context> <task>Propose the star schema: which tables become facts, which become dimensions, which should be merged, which should be dropped, and the key columns that join them.</task> <constraints>One fact grain per fact table. Conformed dimensions shared across facts. Flag any table that is really a fact pretending to be a dimension. Do not recommend a snowflake unless the cardinality genuinely forces it.</constraints> <format>A table of Table, Role, Keeps or merges into, Key column, Reason. Then the relationship list as From table, To table, Cardinality, Direction.</format>

A fact and dimension plan with the exact relationships to create in Model view.

๐Ÿ’ก

Pro tip: Include row counts. Cardinality is what decides fact from dimension, and Claude will misclassify a 40-row lookup table as a fact without it.

Relationship and Cardinality Review

9/35

You are reviewing an existing model for the relationship mistakes that produce wrong numbers. <context>[PASTE THE RELATIONSHIP LIST FROM MODEL VIEW: from table and column, to table and column, cardinality, cross filter direction, active or inactive]. Symptoms I see: [WRONG TOTALS / BLANK VALUES / DUPLICATED ROWS / AMBIGUOUS PATH ERRORS]. Measures affected: [NAMES].</context> <task>Identify which relationships are wrong or risky, explain what each one does to a measure, and give the corrected configuration.</task> <constraints>Call out many-to-many relationships, bidirectional filters, inactive relationships that a measure needs, and any circular path. Rank the fixes by how likely each is to change reported numbers.</constraints> <format>A ranked table of Relationship, Problem, Effect on numbers, Fix. Then any USERELATIONSHIP measure patterns needed after the change.</format>

A ranked list of relationship problems with the effect each one has on reported numbers.

๐Ÿ’ก

Pro tip: Grab the relationship list from Model view, or open the Manage relationships dialog and copy the rows. Screenshots of the diagram lose the cardinality and direction, which is exactly the part that matters.

Date Table Script

10/35

You are generating a proper date dimension for my model. I will give you the calendar rules. <context>Date range needed: [START] to [END]. Fiscal year starts: [MONTH]. Weeks start on: [DAY]. Columns I need: [YEAR, QUARTER, MONTH NAME, MONTH NUMBER, FISCAL PERIOD, WEEK, DAY NAME, IS WEEKEND, IS CURRENT MONTH, RELATIVE OFFSETS]. Language and format: [LOCALE]. Preferred build method: [DAX CALCULATED TABLE / POWER QUERY M].</context> <task>Write the full date table in the method I chose, with sort-by columns for every text column that needs chronological ordering.</task> <constraints>Cover the whole range with no gaps. Include integer sort columns for month and day names. Add relative offset columns so slicers like last 3 months work without extra DAX.</constraints> <format>One code block with the complete table, then the exact steps to mark it as a date table and set the sort-by columns.</format>

A complete date dimension in DAX or M, with sort-by and relative offset columns.

๐Ÿ’ก

Pro tip: Ask for relative offset columns such as MonthOffset where the current month is zero. They turn last 3 months slicers into a simple numeric filter instead of a fragile DAX expression.

Remove Bidirectional Filters

11/35

You are eliminating bidirectional relationships that cause ambiguity and slow refreshes. I will paste the model. <context>[PASTE THE RELATIONSHIP LIST INCLUDING CROSS FILTER DIRECTION]. Why each bidirectional relationship was added, if I know: [REASONS]. Measures or slicers that depend on it: [LIST].</context> <task>For every bidirectional relationship, say what it was solving and replace it with a single-direction relationship plus a targeted measure pattern.</task> <constraints>Use CROSSFILTER inside the specific measure that needs the two-way behaviour, or TREATAS for the slicer cases. Warn me where a change will visibly alter an existing visual.</constraints> <format>A table of Relationship, What it enabled, Replacement pattern, Visuals to re-test. Then the DAX for each replacement measure.</format>

A one-way model plus targeted measure patterns to replace every bidirectional filter.

๐Ÿ’ก

Pro tip: Change one relationship at a time and re-check the visuals listed in the output. Flipping several at once makes it impossible to tell which change moved a number.

Role-Playing Dimension Plan

12/35

You are handling a dimension used several times in one fact table, such as dates with multiple roles. <context>Fact table and the columns that all point to the same dimension: [FACT TABLE, COLUMNS SUCH AS ORDER DATE, SHIP DATE, DUE DATE]. Dimension table: [NAME]. Which role should be the default in most visuals: [ROLE]. Reports that need each role: [LIST].</context> <task>Recommend the approach: inactive relationships activated by measure, duplicated dimension tables, or a mix. Then give the setup and the measures.</task> <constraints>State the trade-off in model size and user confusion for each option. Name the relationships that stay active. Provide USERELATIONSHIP measure patterns for the inactive ones.</constraints> <format>Recommendation with reasoning, the relationship configuration table, then the DAX for the role-specific measures.</format>

A decision on inactive relationships versus duplicated dimensions, with the DAX to match.

๐Ÿ’ก

Pro tip: If business users build their own visuals, duplicated date tables beat inactive relationships. Nobody outside the modeling team remembers which measure activates which hidden relationship.

Calculated Column vs Measure Audit

13/35

You are auditing which calculated columns should be measures, moved into Power Query, or deleted. <context>[PASTE EVERY CALCULATED COLUMN WITH ITS DAX AND ITS TABLE]. Table row counts: [COUNTS]. Which columns are used in visuals, slicers or relationships: [USAGE, IF KNOWN]. Model file size: [MB].</context> <task>For each calculated column decide: keep as a column, convert to a measure, push into Power Query, or delete. Justify each call in one line.</task> <constraints>Columns that only ever get aggregated should be measures. Anything that could be computed at the source belongs in Power Query. Never convert a column used in a relationship or a slicer without saying what breaks.</constraints> <format>A table of Column, Verdict, Reason, Replacement code. Then a suggested order of change from safest to riskiest.</format>

A verdict on every calculated column, with replacement code and a safe order of change.

๐Ÿ’ก

Pro tip: High-cardinality calculated columns on a large fact table are the biggest avoidable cost in a model. Prioritize those before touching anything on a dimension.

Model Size Reduction Plan

14/35

You are shrinking a model that has grown too large to refresh comfortably. I will paste the statistics. <context>[PASTE COLUMN SIZES AND CARDINALITY, FROM VERTIPAQ ANALYZER OR YOUR OWN NOTES]. Total model size: [MB]. Refresh duration: [MINUTES]. Columns nobody uses, if known: [LIST]. Grain and history I actually need: [PERIOD].</context> <task>Produce a reduction plan ranked by megabytes saved per unit of effort, covering column removal, cardinality reduction, grain changes and history limits.</task> <constraints>Call out datetime columns that should be split into date and time, GUID and free-text keys, and any column kept only for a tooltip. Say which changes break existing visuals or measures.</constraints> <format>A ranked table of Change, Estimated saving, Effort, What breaks. Then the Power Query or DAX steps for the top three.</format>

A ranked shrink plan with estimated savings and the breakage each change causes.

๐Ÿ’ก

Pro tip: A datetime column stored to the second can be the single largest column in the model. Splitting it into a date column and a time column usually removes more megabytes than deleting five other fields.

Report & Dashboard Design

7 prompts

Page Wireframe From the Questions

15/35

You are laying out a report page around the decisions it supports. I will describe the audience and the data. <context>Audience and their seniority: [WHO]. The three questions they open this report to answer: [QUESTIONS]. The decision that follows: [DECISION]. Measures available: [LIST]. Dimensions available for slicing: [LIST]. Screen it is viewed on: [DESKTOP / MOBILE / EMBEDDED / PRINTED].</context> <task>Wireframe the page in words: what sits in the top band, what fills the middle, what belongs in a drillthrough rather than on the page, and which slicers earn their space.</task> <constraints>Maximum six visuals on the page. Every visual must answer one of the stated questions or be cut. Reading order runs top left to bottom right. Say what you removed and why.</constraints> <format>A grid description with position, visual type, fields and the question it answers. Then a Cut list and a Drillthrough page list.</format>

A words-first wireframe tied to the three questions the page exists to answer.

๐Ÿ’ก

Pro tip: Write the questions before you open Power BI. Pages designed around available fields always end up with twelve visuals and no answer.

Chart Type Picker

16/35

You are choosing the right visual for each question on my page. I will list the questions and the data shape. <context>For each question: [QUESTION], measure [MEASURE], dimension and its distinct count [DIMENSION, CARDINALITY], time element [YES / NO], comparison needed [VS TARGET / VS PRIOR PERIOD / VS PEERS / NONE]. Audience data literacy: [HIGH / MIXED / LOW].</context> <task>Recommend a visual type per question, name the fields that go on each axis or field well, and give the one alternative worth testing.</task> <constraints>No pie charts above five categories. No dual axis unless the units genuinely differ and you say how to label it. Reject any request for a visual that will mislead, and explain what it would hide.</constraints> <format>A table of Question, Visual, Field wells, Alternative, Why not the obvious choice.</format>

A defensible visual choice per question, with field wells and one alternative to test.

๐Ÿ’ก

Pro tip: Give the distinct count of the dimension. A bar chart is right at 8 categories and unreadable at 400, and Claude cannot judge that from the field name alone.

KPI Card Spec Sheet

17/35

You are specifying the KPI cards that sit at the top of the report so each one carries its own context. <context>Candidate KPIs: [LIST WITH THEIR MEASURES]. Targets and where they come from: [TARGETS]. Comparison period: [PRIOR MONTH / PRIOR YEAR / BUDGET]. What counts as good, watch and bad for each: [THRESHOLDS]. Audience: [WHO].</context> <task>Cut the list to the five that drive decisions, and for each specify the value, the comparison, the trend element, the conditional formatting rule and the exact label wording.</task> <constraints>Every card shows a comparison, never a naked number. Thresholds must come from my input, not invented. Colour must never be the only signal, pair it with an arrow or a word.</constraints> <format>A spec table of KPI, Measure, Comparison, Trend, Format rule, Label text. Then the KPIs you cut and why.</format>

A five-card spec with comparisons, thresholds and label copy, plus the cards to cut.

๐Ÿ’ก

Pro tip: Ask for the exact label text. A card reading Revenue vs budget, month to date removes the question every executive asks when they see a bare number.

Accessible Color and Format Rules

18/35

You are writing a formatting standard for my reports so they are readable and accessible. <context>Brand colours with hex codes: [HEX LIST]. Report types in scope: [OPERATIONAL / EXECUTIVE / FINANCIAL]. Where they are consumed: [SCREEN / PROJECTOR / PRINTED / MOBILE]. Known constraints: [COLOUR BLIND USERS, DARK MODE, LOCALE, CURRENCY].</context> <task>Produce the standard: a categorical palette, a sequential palette, semantic colours for good and bad, plus number formatting, date formatting and font size rules by element.</task> <constraints>Check contrast against WCAG AA for text on each background and give the ratio. Never rely on red and green alone. Cap the categorical palette at eight colours and say what to do beyond that.</constraints> <format>Hex tables per palette with contrast ratios, a formatting rules table by element, then the alt-text pattern to write on each visual.</format>

A contrast-checked palette and formatting standard, including an alt-text pattern.

๐Ÿ’ก

Pro tip: Power BI has an Alt text box under Format, General for every visual. Ask Claude for a reusable sentence pattern and the screen reader experience stops being an afterthought.

Drillthrough and Bookmark Plan

19/35

You are designing the navigation layer so users get detail without a wall of visuals on the front page. <context>Pages that exist today: [LIST WITH PURPOSE]. Detail users keep asking for: [REQUESTS]. Fields that would make sensible drillthrough filters: [FIELDS]. Views the same audience toggles between: [VIEWS SUCH AS CHART VS TABLE, THIS YEAR VS LAST].</context> <task>Plan the drillthrough pages with their filter fields, and the bookmarks with what each one captures, plus the buttons and labels that trigger them.</task> <constraints>Every drillthrough page names its entry point and keeps a back button. Bookmarks must state whether they capture data, display or current page, since capturing everything is the usual cause of surprise behaviour.</constraints> <format>A table of Drillthrough page, Filter fields, Entry visual. A second table of Bookmark, What it captures, Button label. Then a test list.</format>

A drillthrough and bookmark plan with capture settings and button labels.

๐Ÿ’ก

Pro tip: Bookmarks capture data, display and current page by default. Ask Claude to state the intended setting per bookmark, because an unwanted data capture silently freezes the slicers.

Report Rewrite for an Executive Audience

20/35

You are rewriting an analyst report for an executive audience without losing rigour. I will paste what exists. <context>[PASTE THE CURRENT PAGE INVENTORY: page names, visuals, fields, any text boxes]. Current audience: [WHO]. New audience and their seniority: [WHO]. Time they will spend on it: [SECONDS OR MINUTES]. The decision they own: [DECISION].</context> <task>Restructure it: what appears on the single page they will actually look at, what moves to an appendix page, what gets deleted, and what written summary sits at the top.</task> <constraints>One page must answer the decision on its own. No visual survives without a stated purpose. Detail is not deleted, it is relocated and linked.</constraints> <format>A page-by-page plan of Keep, Move, Delete with reasons, then the draft text for the summary box at the top of the main page.</format>

A page-by-page restructure that gives executives one decisive page and an appendix.

๐Ÿ’ก

Pro tip: Paste the field list of every visual, not a description of the report. The rewrite is only useful when Claude can see which measures are duplicated across pages.

Tooltip and Annotation Copy

21/35

You are writing the explanatory text that stops users misreading the report. I will paste the visuals and their definitions. <context>[PASTE EACH VISUAL WITH ITS MEASURES AND FILTERS]. Known misreadings from users: [WHAT PEOPLE GET WRONG]. Data caveats: [LATE-ARRIVING DATA, EXCLUSIONS, ESTIMATES, REFRESH TIME]. Audience: [WHO].</context> <task>Write the tooltip text for each visual, a one-line caveat where the data has a limitation, and the report-level note explaining refresh timing and source.</task> <constraints>Tooltips under 20 words. State the measure definition in business terms, not DAX. Every exclusion the user cannot see from the visual must be named.</constraints> <format>A table of Visual, Tooltip text, Caveat line. Then the report footer note in full.</format>

Tooltip and caveat copy that pre-empts the questions users send you by email.

๐Ÿ’ก

Pro tip: Report-level text is the cheapest support ticket deflection in Power BI. One line naming the refresh time and the exclusions removes most of the is this data current messages.

These prompts give you the what. Tutorials give you the why.

Learn when to use extended thinking, how to build Claude Projects, and workflows that compound. 300+ tutorials and growing.

Try AI Academy Free

Power Query (M) Transformations

7 prompts

M Query From a Messy Export

22/35

You are writing a Power Query script to clean an ugly export. I will paste a sample of the file. <context>[PASTE THE FIRST 20 ROWS EXACTLY AS THEY APPEAR, INCLUDING THE JUNK ROWS AND HEADERS]. Source type: [CSV / EXCEL / SHAREPOINT / DATABASE]. How the file changes each month: [NEW COLUMNS, SHIFTING HEADER ROW, EXTRA TOTALS ROW]. Target shape I need: [COLUMNS AND TYPES].</context> <task>Write the complete M query that gets from this file to the target shape, and make it survive next month's version of the file.</task> <constraints>Do not hard-code row numbers where a condition can find the row instead. Set explicit data types at the end. Handle the totals row and any merged header. Comment each step in one short line.</constraints> <format>One M code block ready for the Advanced Editor, then a list of what will break if the source changes and how to spot it.</format>

A complete, commented M query that survives next month's version of the same export.

๐Ÿ’ก

Pro tip: Paste the raw junk rows exactly as they appear. The value of this prompt is in handling the four title rows and the merged header, which a cleaned-up sample hides.

Unpivot Plan for a Wide Sheet

23/35

You are converting a wide, human-formatted sheet into a tidy table Power BI can model. <context>[PASTE THE HEADER ROWS AND THREE SAMPLE DATA ROWS]. What the repeating columns represent: [MONTHS, SITES, PRODUCTS]. Columns that must stay as identifiers: [LIST]. Are the headers multi-row or merged: [YES / NO]. New columns are added: [MONTHLY / QUARTERLY / NEVER].</context> <task>Write the M that promotes the right header, unpivots only the repeating columns, splits any combined header into separate fields, and types the result.</task> <constraints>Use unpivot other columns rather than naming every repeating column, so new periods are handled automatically. Preserve nulls rather than converting them to zero unless I say otherwise.</constraints> <format>The M code block, then a before and after row count sanity check I can run to confirm nothing was lost.</format>

M that unpivots a wide sheet and keeps working when new period columns appear.

๐Ÿ’ก

Pro tip: Always ask for Unpivot other columns rather than Unpivot columns. Naming the columns explicitly is what makes a query break the first month someone adds a period.

Fix a Broken Applied Step

24/35

You are debugging a Power Query step that has started failing. I will paste the code and the error. <context>[PASTE THE FULL M FROM THE ADVANCED EDITOR]. [PASTE THE EXACT ERROR MESSAGE AND THE STEP NAME IT POINTS TO]. What changed recently: [SOURCE CHANGE, RENAME, NEW VALUES, PERMISSIONS]. Does it fail in Desktop, in the service, or both: [WHERE].</context> <task>Explain what the error actually means, identify which step introduced the assumption that broke, and rewrite that step to be resilient.</task> <constraints>Check for renamed columns, a changed header row, type conversion on unexpected values, and privacy level or gateway issues when it only fails in the service. Do not rewrite steps that are fine.</constraints> <format>Plain explanation of the error, the corrected step in a code block, then two lines on how to make the query fail loudly next time instead of silently dropping rows.</format>

A named cause for a failing applied step and a resilient rewrite of just that step.

๐Ÿ’ก

Pro tip: Say whether it fails only after publishing. Errors that appear in the service but not in Desktop are almost always gateway credentials or privacy levels, not the M itself.

Merge and Append Strategy

25/35

You are deciding how to combine several sources correctly. I will describe each one. <context>For each source: [NAME, GRAIN, KEY COLUMNS, ROW COUNT, HOW OFTEN IT REFRESHES]. What I am trying to produce: [TARGET TABLE AND GRAIN]. Known key quality problems: [DUPLICATES, CASE MISMATCH, TRAILING SPACES, MISSING KEYS].</context> <task>Decide append versus merge for each pairing, choose the join type, and write the M including the key cleaning that has to happen before the join.</task> <constraints>Warn where a merge will multiply rows because the key is not unique. Clean and trim keys before joining, never after. State the expected row count after each operation.</constraints> <format>A decision table of Sources, Operation, Join type, Expected rows, Risk. Then the M code, then the row count checks to run.</format>

A join-by-join plan with expected row counts and the key cleaning to do first.

๐Ÿ’ก

Pro tip: Ask for the expected row count after every step. A merge that silently doubles your fact table is the most expensive Power Query mistake and the easiest to catch with one number.

Custom Column Formula

26/35

You are writing a custom column in M for logic that is easier upstream than in DAX. <context>Table and the columns available with their types: [COLUMNS AND TYPES]. The rule in plain English: [RULE, INCLUDING EVERY EDGE CASE]. What should happen with nulls: [BEHAVIOUR]. What should happen with unexpected values: [BEHAVIOUR]. Sample inputs and their correct outputs: [EXAMPLES].</context> <task>Write the custom column M expression, handle the null and unexpected cases explicitly, and set the resulting data type.</task> <constraints>M is case sensitive, so match my column names exactly. Prefer a readable if then else chain over a clever one-liner. Never let an unexpected value produce a silent null.</constraints> <format>The expression in a code block, the full step to paste into the Advanced Editor, and a short table showing the output for each of my sample inputs.</format>

A custom column expression with explicit null handling and a worked sample table.

๐Ÿ’ก

Pro tip: Give three sample inputs and the outputs you expect, including one edge case. Claude checks its own logic against them and catches inverted conditions before you paste anything.

Query Folding Review

27/35

You are reviewing my query for folding so the source database does the work instead of my laptop. <context>[PASTE THE FULL M]. Source: [SQL SERVER / SYNAPSE / ORACLE / ODBC / FILE]. Row count at the source: [ROWS]. Refresh duration now: [MINUTES]. Steps where View Native Query is greyed out: [STEP NAMES, IF I CHECKED].</context> <task>Identify the first step that stops folding, explain why it breaks it, and reorder or rewrite the query so filtering and grouping fold back to the source.</task> <constraints>Filter rows and remove columns as early as possible. Flag custom columns, index columns and Table.Buffer as folding breakers. Say honestly when a step cannot fold and must stay client-side.</constraints> <format>A step-by-step folding verdict, the reordered M in a code block, and how to verify folding with right-click, View Native Query.</format>

The first folding breaker named, plus a reordered query that pushes work to the source.

๐Ÿ’ก

Pro tip: Right-click any step in Power Query and check View Native Query. The first step where it greys out is where folding died, and everything after it runs on your machine.

Parameterize the Source Path

28/35

You are making my queries portable so the file path or environment is not hard-coded in twenty places. <context>[PASTE THE SOURCE STEPS FROM EACH QUERY THAT CONTAINS A PATH, SERVER OR DATE]. Environments in play: [DEV / TEST / PROD PATHS OR SERVERS]. Who else opens this file: [PEOPLE AND THEIR SETUP]. Published to the service with a gateway: [YES / NO].</context> <task>Define the parameters to create, rewrite each source step to use them, and explain how the values are switched in Desktop and in the service.</task> <constraints>One parameter per genuinely varying value, no more. Give each a sensible default and a data type. Note which parameters can be edited in dataset settings after publishing.</constraints> <format>A parameter table of Name, Type, Default, Used by. Then the rewritten source lines, then the switch instructions for Desktop and the service.</format>

A parameter set that removes hard-coded paths and can be switched after publishing.

๐Ÿ’ก

Pro tip: Create parameters under Home, Manage Parameters in Power Query. Once a source step uses one, you can change the value in dataset settings in the service without republishing the file.

Insights & Executive Summaries

7 prompts

Narrative From a Dashboard Export

29/35

You are writing the commentary for a report from its underlying numbers. I will paste the data behind the visuals. <context>[PASTE THE EXPORTED DATA FROM EACH VISUAL AS CSV OR A PASTED TABLE]. Reporting period: [PERIOD]. Targets or budget for each measure: [TARGETS]. Audience: [WHO]. What they will do with this: [DECISION].</context> <task>Write the narrative: the three things that actually moved, what each is worth in absolute and percentage terms, the most plausible driver of each, and what to watch next period.</task> <constraints>Never state a cause the data cannot support, label plausible drivers as hypotheses to test. Round consistently. Skip any metric that moved less than the normal variation.</constraints> <format>A three-line headline summary, then a bullet per movement with the number and the hypothesis, then Watch next period.</format>

Report commentary built from exported numbers, with drivers flagged as hypotheses.

๐Ÿ’ก

Pro tip: Use the visual menu, More options, Export data to get the underlying table as CSV. Pasting real numbers gives you commentary you can defend, unlike describing the chart in words.

Variance Explainer for a KPI Drop

30/35

You are decomposing a metric movement so the explanation survives questioning. I will paste the breakdowns. <context>Metric and its movement: [METRIC, FROM VALUE TO VALUE, PERIOD]. [PASTE THE SAME METRIC SPLIT BY EACH DIMENSION: REGION, PRODUCT, CHANNEL, SEGMENT, EACH WITH BOTH PERIODS]. Known events in the period: [PRICE CHANGE, OUTAGE, CAMPAIGN, SEASONALITY, DATA ISSUE].</context> <task>Attribute the movement across dimensions, quantify how much each slice contributed, separate mix effects from rate effects, and rank the candidate explanations.</task> <constraints>Contributions must roughly reconcile to the total movement, say so if they do not. Distinguish a genuine decline from a mix shift. Name the data-quality checks to run before anyone presents this.</constraints> <format>A contribution table by slice with absolute and percentage share, a ranked explanation list, then a Check before presenting list.</format>

A reconciled contribution breakdown that separates mix shifts from real declines.

๐Ÿ’ก

Pro tip: Paste both periods for every dimension in one message. Attribution needs the before and after side by side, and a single-period export forces Claude to guess.

Executive One-Pager

31/35

You are compressing a full report into one page an executive can read in ninety seconds. I will paste the numbers. <context>[PASTE THE KEY MEASURES WITH CURRENT, PRIOR AND TARGET VALUES]. Period: [PERIOD]. Audience and what they are accountable for: [WHO, THEIR METRIC]. Decisions they need to make this month: [DECISIONS]. What is already known to them: [CONTEXT TO SKIP].</context> <task>Write the one-pager: the headline verdict, four numbers that matter with their comparisons, what changed and why, the risks, and the decisions requested with a recommendation for each.</task> <constraints>Under 350 words. Lead with the verdict, not the method. Every decision requested has a recommendation and a deadline. No metric appears without a comparison.</constraints> <format>Headline verdict in one sentence, a four-row number table, Why it moved, Risks, then Decisions requested with owner and date.</format>

A ninety-second executive page that leads with a verdict and ends with decisions.

๐Ÿ’ก

Pro tip: Paste the target alongside the actual for every measure. A number without a target forces the reader to build their own benchmark, which is where executive misreadings start.

Anomaly Shortlist

32/35

You are scanning a data extract for anomalies worth investigating before a report goes out. <context>[PASTE THE DATA AS CSV: DIMENSIONS, MEASURES, ONE ROW PER PERIOD OR ENTITY]. What normal variation looks like: [TYPICAL RANGE OR PERCENTAGE]. Known seasonality: [PATTERNS]. Recent changes to sources or logic: [CHANGES].</context> <task>Shortlist the anomalies, separating likely data-quality problems from genuine business movements, and rank them by how much they would embarrass us if presented uncorrected.</task> <constraints>Flag duplicated rows, sudden zeroes, missing periods, sign flips and impossible values as data quality first. Only call something a business movement once the data explanations are ruled out. Show the rows you are reacting to.</constraints> <format>A ranked table of Anomaly, Rows affected, Data issue or business movement, Check to run, Who to ask.</format>

A ranked anomaly list that sorts data-quality problems from real business movements.

๐Ÿ’ก

Pro tip: Run this before the report goes out, not after. Catching a duplicated load or a missing week yourself is a different conversation from having the CFO catch it.

Stakeholder Q&A Prep

33/35

You are preparing me for the questions this report will trigger. I will paste what I am presenting. <context>[PASTE THE NUMBERS AND THE COMMENTARY I PLAN TO SHOW]. Audience and their known positions: [WHO, WHAT THEY BELIEVE OR WANT]. Weak spots I already know about: [WEAKNESSES]. Data caveats: [EXCLUSIONS, ESTIMATES, LATE DATA].</context> <task>Predict the fifteen questions most likely to be asked, ranked by probability, and draft a short honest answer for each including the ones where the answer is that we do not know yet.</task> <constraints>Include the hostile questions and the definitional ones, such as how a metric is calculated and why it differs from another team's number. No defensive answers, no answers that promise analysis I did not agree to.</constraints> <format>A ranked list of Question, Answer in under 40 words, and a flag on the ones needing a follow-up commitment.</format>

The fifteen likeliest questions with short honest answers, hostile ones included.

๐Ÿ’ก

Pro tip: The metric definition questions are the ones that derail meetings. Ask for the answer to why does your number differ from theirs before the meeting, not during it.

Metric Definition Dictionary

34/35

You are documenting what each measure in my model actually means so two teams stop reporting different numbers. <context>[PASTE EACH MEASURE NAME WITH ITS DAX]. Source tables and their grain: [TABLES]. Known filters or exclusions built into the model: [EXCLUSIONS]. Where the same metric is calculated elsewhere: [OTHER SYSTEMS OR REPORTS].</context> <task>Write a business-readable definition for each measure: what it counts, what it excludes, the grain, the refresh cadence, and where it may legitimately differ from another system.</task> <constraints>Translate the DAX into business language without dropping the exclusions, since the exclusions are what cause disputes. Flag any measure whose name implies something different from what it computes.</constraints> <format>A dictionary table of Measure, Plain definition, Includes, Excludes, Grain, Known differences. Then a rename list for the misleading names.</format>

A business-readable data dictionary generated from your DAX, with misleading names flagged.

๐Ÿ’ก

Pro tip: The rename list is the payoff. A measure called Active Users that quietly excludes trials will cost you a meeting eventually, and the DAX is where that shows up.

Monthly Business Review Script

35/35

You are turning this month's report into the script for the review meeting. I will paste the numbers and the agenda. <context>[PASTE THE MONTHLY NUMBERS WITH PRIOR PERIOD AND TARGET]. Meeting length: [MINUTES]. Attendees and their roles: [NAMES AND ROLES]. Decisions that must come out of it: [DECISIONS]. Topics that always eat the clock: [TIME SINKS].</context> <task>Write the walkthrough: what to say per slide or page, in what order, with the timebox for each and the exact question that closes each section.</task> <constraints>Timeboxes add up to the meeting length with five minutes spare. Every section ends in a question that forces a decision or an owner. Park the known time sinks explicitly rather than hoping they do not come up.</constraints> <format>A timeboxed running order with the talking points and the closing question per section, then a Parked topics list with who follows up.</format>

A timeboxed review script where each section closes on a decision-forcing question.

๐Ÿ’ก

Pro tip: Give Claude the topics that always overrun. A named parking lot at the start is the only reliable way to stop one metric consuming half the review.

Frequently Asked Questions

No. Claude does not run inside Power BI Desktop or the Power BI service. It cannot open your PBIX file, read your model, refresh a dataset or write a measure into your report. Everything on this page works by copy and paste: you paste a table list, a measure, an error message or an exported CSV into Claude, and you paste the DAX, M or written summary back into Power BI yourself.
It works when you give it the model shape. Claude cannot see your tables, so paste the exact table and column names from the Fields pane, the relationships with their cardinality and cross filter direction, and any measure the new one depends on. Most formulas that fail to commit fail because a column name was approximated. Always test the result in a matrix visual against a number you already trust.
Copilot sits inside Power BI and can see your semantic model, which makes it quicker for suggesting a measure or a visual in context. It also requires the right capacity and licensing. Claude works from what you paste, which makes it stronger for the reasoning tasks: explaining an inherited measure line by line, planning a star schema from a table inventory, writing report commentary from exported numbers, or drafting an executive one-pager.
For tables and columns, copy the field list or a screenshot text of the Fields pane. For relationships, open Manage relationships and copy the rows, which include cardinality and cross filter direction. For a measure, select it and copy the DAX from the formula bar. For data, use the visual menu, More options, Export data to get a CSV of exactly what a visual is showing.
Check your data policy first. Model structure, DAX and M code are usually low risk since they contain no records, while exported rows may contain customer, employee or financial data. Business and enterprise plans generally exclude your inputs from model training and consumer plans have different settings, so confirm which account you are using. When you only need the shape, replace real values with dummy numbers before pasting.
Use the most capable model on your plan for anything involving filter context, performance rewrites or model design, since those are reasoning problems where a shortcut produces a plausible but wrong answer. A faster model is fine for routine work such as formatting rules, tooltip copy, naming conventions and turning an export into readable commentary.

Prompts are the starting line. Tutorials are the finish.

A growing library of 300+ hands-on tutorials on ChatGPT, Claude, Midjourney, and 50+ AI tools. New tutorials added every week.

7-day free trial. Cancel anytime.