Skip to content
Educora
University25 min10 / 10

Capstone project: a sales analytics dashboard and Copilot

Build a sales dashboard end to end — from requirements to KPIs, from Power Query and a star model to the measure layer, from report pages to publishing, RLS, refresh and an app — reconcile the numbers and learn what Copilot can do.

Check yourself
In this lesson you will learn
  • Turn business questions into KPIs, measures and visuals
  • Carry out the whole workflow, from source to app, in order
  • Reconcile the numbers with the source before publishing
  • Know Copilot's capabilities, requirements and limits

In this lesson we bring every part of the course together in one project. The director of a three-store chain has set the task: “When I open it each morning, I want to see the state of sales, the growth, the best city and product; and the managers should see only their own store.” We will work in stages and check the numbers at the end of each one — that is how a professional analyst works.

Stage 1: from questions to KPIs

Business questionMeasureVisual
How much did we sell?Total Sales, Orders, AOVCard
Are we growing?Sales YTD, Sales LY, YoY %KPI, Line chart
Which city and product lead?City Rank, % of All Cities, Top ProductClustered bar chart, Matrix
Who are the most valuable customers?Sales per CustomerTable
Rule: choose a visual only after you have named the question and the measure. A visual that is not in this table does not go on the dashboard.
AOV = S / NAOV = S / N
where:
  • AOVaverage order value, ₼
  • Ssales in the selected period, ₼
  • Nnumber of orders

On the sample data: 665 / 8 = 83.125 ₼; in Baku 345 / 4 = 86.25 ₼.

Stage 2: data, model and the measure layer

  1. 1
    Sources

    Monthly sales CSVs sit in a SharePoint folder, and Product and Store are in an Excel file stored there too. Because we chose a cloud source, no gateway will be needed later.

  2. 2
    Power Query

    Combine the folder's files with Combine & Transform Data, drop unneeded columns, set types with a locale, apply Trim to the keys and move the folder path into a parameter.

  3. 3
    Model

    A star schema: Sales in the middle; Product, Store, Customer and a DAX-built Date around it. All relationships are *:1 and Single; the date table is marked, Auto date/time is off and the keys are hidden.

  4. 4
    Measure layer

    Create an empty _Measures table with Home › Enter data and collect every measure there, so users find them in one place. Give each measure a format and a Description.

DAX
Total Sales = SUMX ( Sales, Sales[Quantity] * Sales[UnitPrice] )
Orders = COUNTROWS ( Sales )
AOV = DIVIDE ( [Total Sales], [Orders] )
Sales LY = CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
YoY % = DIVIDE ( [Total Sales] - [Sales LY], [Sales LY] )
City Rank = RANKX ( ALL ( Store[City] ), [Total Sales] )
Top Product =
VAR T = TOPN ( 1, VALUES ( Product[Product] ), [Total Sales] )
RETURN CONCATENATEX ( T, Product[Product], ", " )
The project's measure layer. TOPN picks the product with the highest sales and CONCATENATEX turns it into text (on a tie the names are listed with commas).
Example 1: reconciliation before publishing

Reconcile the measure results for January–March 2026 with the source file and find Top Product for Baku.

Show solution
1) In Excel SUM = 665 ₼ and the row count = 8 → Total Sales = 665, Orders = 8, AOV = 83.125 ₼ ✓.
2) Distinct customers: C1, C2, C3, C4 → 4 ✓.
3) Months: January 120 + 50 + 45 = 215, February 120 + 100 + 60 = 280, March 80 + 90 = 170; total 665 ✓.
4) Across the chain Top Product = Backpack (120 + 80 = 200).
5) In Baku: Headphones 120, Notebook 100, Backpack 80, Keyboard 45 → Headphones.
All checks pass — the report can be published.

Stage 3: report pages

  1. Overview: Total Sales, Orders, AOV and Customers cards plus the Sales YTD KPI on top; a monthly line chart in the middle (215 → 280 → 170) with a bar chart by city next to it; one date slicer.
  2. Products: a Category → Product matrix with conditional formatting on % of Category; the page is also the drillthrough target for Product.
  3. Customers: a customer table (Total Sales, Orders, Sales per Customer) with bookmark buttons to switch between table and chart.
  4. City tooltip: a mini page that opens when you hover over a city — Total Sales, City Rank, Top Product.
Example 2: first-quarter growth year over year

Monthly sales of the bigger shop (from the time intelligence lesson): 2025 — 1000, 1200, 1100; 2026 — 1150, 1300, 1210 ₼ (January–March). With Quarter = Q1 of 2026 selected in the slicer, what will the YoY % card show?

Show solution
1) Filter context: the January–March days of 2026. Total Sales = 1150 + 1300 + 1210 = 3660 ₼.
2) SAMEPERIODLASTYEAR shifts the same days to 2025: Sales LY = 1000 + 1200 + 1100 = 3300 ₼.
3) YoY % = (3660 − 3300) / 3300 = 360 / 3300 ≈ 10.91%.
Note: the average of the monthly percentages, (15% + 8.33% + 10%) / 3 ≈ 11.11%, is wrong — a quarter's percentage is computed from the quarter's totals.

Stage 4: publish, secure, refresh, app

Publish to the “Sales Analytics” workspace with Home › Publish. Create a dynamic RLS role with the rule Store[ManagerEmail] = USERPRINCIPALNAME (), add the managers to the role in the Service and check it with Test as role. Because the source lives in SharePoint, schedule the refresh for 07:00 without a gateway. Finally, publish an app with two audiences using Create app — “Directors” see every page, “Managers” see Overview and Products — and endorse the semantic model as Promoted.

Copilot in Power BI

Copilot is an assistant based on generative AI. Requirements: the workspace must be on paid Fabric capacity (F2 or higher) or Power BI Premium (P1 or higher); trial capacities and free SKUs are not supported, and a Pro or PPU licence alone is not enough. The administrator must not have turned off the Users can use Copilot and other features powered by Azure OpenAI setting. In Desktop, Copilot needs write access to a workspace on such capacity.

  • Summarise a report and ask questions about the data in the Copilot pane on the right of a report.
  • Create or edit a report page from a description and add a summary (narrative) visual to a page.
  • Write and explain DAX queries in DAX query view and add descriptions to measures.
  • A separate full-screen standalone Copilot (preview) finds and answers questions about any report or model you can access.
A vague prompt
Make a sales report.
A precise prompt with measure and column names
Create a page named Overview with cards for [Total Sales],
[Orders] and [AOV], a line chart of [Total Sales] by
'Date'[Month], and a bar chart of [Total Sales] by
Store[City] sorted descending.
Copilot relies on the names in the model: clear names, descriptions and synonyms improve the answers. Microsoft recommends preparing your data for AI before using Copilot.

Key points

  • Order: question → measure → visual; a visual that is not in the plan does not go on the dashboard.
  • Keep the measure layer in its own table with formats and descriptions.
  • Reconcile numbers with the source before publishing; a quarter's percentage is not the average of monthly ones.
  • A cloud source refreshes without a gateway; dynamic RLS and an app with audiences simplify sharing.
  • Copilot needs F2+ or P1+ capacity; always verify its results.

Check yourself

10 questions. Every correct answer earns XP.

1 / 10
Sumgait has 2 orders and 210 ₼ of sales. What is the AOV?