Sub topic 3
Preparing your semantic model
Copilot does not see your report in the way you do. It reads the semantic model: table names, column names, data types, relationships, and measures. It uses those to decide which fields answer a prompt. A model built for one analyst who knows that Amt2 means net revenue can work well for that analyst and still confuse Copilot. This chapter covers the structural and naming work that improves Copilot's results before you write any prompts.
This chapter assumes you already have the following:
- You can open a model in Power BI Desktop and use Model view.
- You know what a star schema is and can read relationships.
- You can write a basic DAX measure.
- Copilot is already enabled for your workspace (covered in the previous chapter).
Descriptions, synonyms, and AI instructions have their own chapter. Here the focus is on the model itself.
Why model quality limits Copilot quality
When you ask for "sales by region", Copilot has to map "sales" and "region" to real fields. It also has to pick an aggregation and choose a valid way to relate the two. Each step can go wrong if the model is ambiguous.
| Model problem | What Copilot may do |
|---|---|
| Two columns that could both mean "sales" | Pick one, possibly the wrong one |
| A numeric column with no clear default aggregation | Sum a value that should be averaged |
| No relationship between two tables | Show a visual that ignores a filter, or refuse |
| Cryptic names such as `Col17` | Leave the field out or guess its meaning |
| Hidden helper fields left visible | Offer them as if they were business fields |
Copilot's output is a draft built from these choices. The cleaner the model, the fewer wrong choices it can make.
Check the structure first
Copilot works best on a star schema: one or more fact tables holding events (orders, transactions), surrounded by dimension tables holding descriptions (product, customer, date). This is the same shape that makes DAX filter context predictable, and Copilot benefits for the same reason.
Review these points in Model view:
- Every fact table connects to its dimensions. An unrelated dimension table is a common cause of a visual that shows the same total on every row.
- Relationships are one-to-many and single direction unless you have a specific reason otherwise. Bidirectional filters and many-to-many relationships make results harder to predict, and harder for you to validate later.
- There is one clear path between two tables. Ambiguous paths force the engine to choose, and a prompt cannot tell it which path you meant.
- Role-playing dimensions are deliberate. If
Saleshas bothOrderDateandShipDate, only one relationship toDatecan be active. Decide which one the default "sales by month" should use, and name the inactive one clearly in any measure that activates it.
If you inherited a flat, wide table with fifty columns, splitting it into a fact table and dimensions will help Copilot more than any amount of prompt tuning.
Use names a business user would say
Copilot matches the words in your prompt against names in the model. Names that match how people talk lead to better matches.
| Before | After | Reason |
|---|---|---|
| `tbl_fct_sls` | `Sales` | Plain table name |
| `CustCtry` | `Customer Country` | No abbreviation to decode |
| `Amt` | `Sales Amount` | States what the amount is |
| `Flag1` | `Is Returned` | Describes the meaning |
| `Qty` and `Quantity` in one table | One column, `Quantity` | No competing candidates |
A few rules cover most cases:
- Spell words out. Avoid prefixes such as
tbl_anddim_. - Make each name unique within the model where you can.
Namein five tables is hard to resolve, whileProduct NameandCustomer Nameare not. - Use one term per concept. If the business says "revenue" in some places and "sales" in others, pick one name and add the other as a synonym (next chapter).
- Keep names stable. Renaming a field after reports exist can break visuals, so rename before you build on the model.
Hide what a person would never put on a report
Foreign keys, surrogate keys, sort-order helper columns, and staging fields are needed by the model but are not meant for reports. Hide them in Model view. This helps in two ways. People building visuals manually see a shorter field list, and Copilot has fewer irrelevant candidates to choose from.
Hide tables too. A bridge table, a parameter table used internally, or a disconnected helper table is rarely something a prompt should reach for.
Hiding is different from deleting. A hidden field still works in relationships, measures, and sort-by-column settings. Do not hide a field that a report author is expected to filter or group by.
Power BI Desktop also has a Prep data for AI feature that lets you choose which fields Copilot should consider. Treat it as a second filter on top of good hiding practice, not a replacement for it. Check the current Microsoft documentation for where it appears in your version, since the Copilot experience changes often.
Get data types, formats, and summarization right
For every column, confirm three settings in the column's properties.
Data type. A year stored as text will not aggregate, and a numeric ID stored as a whole number invites a sum that means nothing.
Default summarization. Numeric columns that are really identifiers, such as OrderID, CustomerKey, or a postal code, should be set to Don't summarize. Otherwise Copilot or a manual user may sum them. Columns that are quantities you actually add up should be set to Sum. Rates and prices usually should not be summed, so set them to Average or, better, replace them with a measure.
Format and data category. Set currency, percentage, and date formats. Set data categories for geographic fields such as City, Country/Region, and Latitude/Longitude so map visuals can use them.
Sorting also matters. If Month Name sorts alphabetically, a generated trend chart will show April before January. Use Sort by column to sort Month Name by Month Number. Do this once in the model and every visual benefits.
Define explicit measures for the numbers that matter
A column with Sum as its default aggregation works for quick visuals, but business numbers belong in measures. A measure has one definition, one name, and one place to fix it. Copilot's DAX suggestions can also reference your measures instead of rebuilding the logic from raw columns each time.
Create base measures first, then build on them:
Total Sales = SUM ( Sales[SalesAmount] )Order Count = DISTINCTCOUNT ( Sales[OrderID] )Later measures, whether you write them or Copilot drafts them, can then refer to [Total Sales] and [Order Count]. This keeps definitions consistent. If "sales" later needs to exclude returns, you change one measure.
Once base measures exist, you can hide the raw SalesAmount column so there is a single obvious way to get sales.
A related point is calculated columns. Avoid ones that only reformat other columns for display. They add fields without adding meaning, and every extra field is another candidate for Copilot to pick.
Give the model a proper date table
Time-based prompts such as "last 12 months", "year over year", and "monthly trend" depend on a date table. Without one, time intelligence functions such as SAMEPERIODLASTYEAR can return wrong results or errors, and a generated trend may be built from a raw date column on the fact table.
A usable date table has these properties:
- One row per day, with no gaps.
- A continuous range that covers all dates in your fact tables.
- A relationship from
Date[Date]to the fact table's date column. - Marked as the model's date table (Table tools > Mark as date table).
If you do not have one from your source, you can build a simple one in DAX:
Date =
ADDCOLUMNS (
CALENDAR ( DATE ( 2022, 1, 1 ), DATE ( 2026, 12, 31 ) ),
"Year", YEAR ( [Date] ),
"Month Number", MONTH ( [Date] ),
"Month", FORMAT ( [Date], "mmm" )
)After you create it, mark it as the date table and set Month to sort by Month Number. Choose the start and end dates to cover your data. Hard-coded ranges like these need updating as time passes, so a date table built from your source data's minimum and maximum dates is better for a long-lived model.
You can check coverage in DAX query view with a short query:
EVALUATE
ROW (
"Date table first", MIN ( 'Date'[Date] ),
"Date table last", MAX ( 'Date'[Date] ),
"First sale", MIN ( Sales[OrderDate] ),
"Last sale", MAX ( Sales[OrderDate] )
)The date table's first and last dates should fall on or outside the first and last sale. If a sale date is outside the date table's range, those rows will drop out of time-based visuals.
Common mistakes
- Leaving every field visible. The field list becomes noise for people and for Copilot.
- Using a numeric key as a measure. Summing
CustomerKeyreturns a number with no meaning. Set it to Don't summarize. - Skipping the date table. The model appears to work until someone asks for year over year.
- Fixing problems in prompts that belong in the model. If you keep writing "use Sales Amount, not Amt2" in every prompt, rename or hide the field instead.
- Treating the model as finished after one pass. When Copilot makes a wrong field choice, ask what in the model made that choice likely, and fix that.
Exercise
Exercise
A model has a fact table Sales with columns OrderID (whole number), CustKey (whole number), Amt (decimal), and OrderDate. There is no date table, and the default summarization on OrderID and CustKey is Sum. A user asks Copilot for "average sales per month for last year" and gets odd numbers. List four changes you would make to the model before trying again.
Show answer
1) Set OrderID and CustKey to Don't summarize, so they are never summed. 2) Rename Amt to Sales Amount and add a base measure such as Total Sales = SUM ( Sales[SalesAmount] ), then hide the raw column. 3) Hide CustKey (and OrderID if it is not a reporting field) so it does not appear as a business field. 4) Add a date table covering all order dates, relate it to Sales[OrderDate], mark it as the date table, and sort the month name by month number. Optionally, check the date range with a DAX query that compares the date table's minimum and maximum with the sales dates.