Sub topic 7
Refining the generated page
This chapter assumes you can already create a report page with Copilot and that you can build and format visuals by hand. It also assumes you know what a slicer, a measure, and filter context are. Here you take a generated page and make it fit for use.
Why a first draft needs refining
Copilot returns a page based on your prompt and the fields it judges relevant. The first draft is a starting point. It may pick a different field than you intended, choose a visual type you would not use, or leave out a slicer. Refining closes that gap with two tools: follow-up prompts and manual edits.
Follow-up prompts
You can keep prompting in the Copilot pane after the page appears. Each prompt works best when it asks for one change and names the target.
Weak follow-ups are vague: "make it better" or "fix the chart". Strong follow-ups name the visual and the change:
Change the monthly sales trend to a line chart and sort the months in calendar order.Add a card showing Sales YoY % above the trend chart.Replace the category visual with a bar chart sorted from highest to lowest total sales.Copilot may rebuild parts of the page when you ask for changes. Check that earlier edits you made by hand are still there after each prompt.
Manual edits
Some changes are faster to make yourself. Use manual edits for these:
- Exact layout, alignment, and sizing of visuals.
- Colors, fonts, and theme choices that must match a brand.
- Axis titles, number formats, and data labels.
- Changing a field in the Data pane when Copilot used the wrong one.
- Interactions between visuals, such as stopping a slicer from filtering one chart.
A practical split is to use prompts for structure (which visuals and fields) and manual edits for polish (formatting and layout).
A refinement loop
The diagram shows a loop that works well in practice.
Worked example
Suppose Copilot built a page from this prompt:
Create a page that shows sales performance by product category and region for the last 12 months. Include total sales, a monthly sales trend, sales by category, and a slicer for region.The draft has a total sales card, a column chart for the trend, a pie chart for category, and a region slicer. You want a clearer category comparison and a year-over-year figure.
- Prompt: "Change the sales by category visual to a horizontal bar chart sorted by total sales, descending."
- Prompt: "Add a card for Sales YoY %."
- Check the new card. If Copilot created a measure, open it and read the DAX. A year-over-year measure like the one below needs a proper date table marked as the model's date table.
Sales LY =
CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
Sales YoY % =
DIVIDE ( [Total Sales] - [Sales LY], [Sales LY] )- Format by hand: set the card to show a percentage with one decimal place, align the visuals to a grid, and rename the axis titles.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| A visual uses a similar but wrong field | Ambiguous field names in the model | Swap the field by hand, then add a description or synonym in the model |
| A prompt removes your manual formatting | Copilot rebuilt the visual | Re-apply the formatting, and make structural changes first |
| The year-over-year card is blank | No marked date table, or too little history | Mark the date table and check the date range |
| Months sort alphabetically | The month name column has no sort-by column | Set the month name to sort by month number |
Exercise
Exercise
You asked Copilot to add a year-over-year card and it shows blank. The measure uses SAMEPERIODLASTYEAR. Name two things to check, and say whether another follow-up prompt is the right first step.
Show answer
Check that the model has a date table marked as the date table, and that the report's date range includes prior-year data. A follow-up prompt is not the right first step. The cause is in the model, so fix the date table or the filters first, then re-check the card.
Exercise
Give one change that suits a follow-up prompt and one that suits a manual edit.
Show answer
A prompt suits a structural change, such as switching the category visual to a sorted bar chart. A manual edit suits polish, such as aligning visuals or setting number formats.