Case 4: sales growth and year-to-date

Two numbers count in the sales meeting: where do we stand since January, and are we growing over the prior year? You calculate both as measures.

In short: TOTALYTD([Total Sales], 'Date'[Date]) returns sales since the start of the year. Growth is DIVIDE([Total Sales] - [Sales Prior Year], [Sales Prior Year]), with the prior year from SAMEPERIODLASTYEAR.

Task 1: sales year-to-date

Task The monthly sales report shows sales since the start of the year. Create the measure "Sales YTD": [Total Sales] from 1 January to the end of the month in the row.

Orders 221 rows, 5 columns
OrderIDDateCustomerIDRepIDAmount
10014 Jan 202510532850
100216 Jan 202510118730
100319 Jan 202510544650
10041 Feb 202510325210
100511 Feb 2025109511440
100611 Feb 202511162000
100711 Feb 202511323850
100812 Feb 202510325670
100913 Feb 202510427380
101013 Feb 202510958250
101116 Feb 202510117650
101221 Feb 202510126750

Showing the first 12 of 221 rows.

Measures: [Total Sales]

Customer 16 rows, 3 columns
CustomerIDCustomerIndustry
101Berg Engineering LtdManufacturing
102Northlight Trading CoRetail
103Harbor Logistics IncServices
104Crane Electric plcManufacturing
105Sunfield Markets LLCRetail
106Alpine Tools LtdManufacturing
107Riverside Consulting LLCServices
108Lakeside Print CoServices
109Rhine Steel IncManufacturing
110West End Fashion LtdRetail
111Valley Wine Merchants LLCRetail
112Midland Services LtdServices

Showing the first 12 of 16 rows.

SalesRep 6 rows, 3 columns
RepIDNameRegion
1Emma ClarkeNorth
2Tom WolfNorth
3Ravi PatelSouth
4Lucy EvansSouth
5Sam KerrWest
6Mia LangWest
Target 144 rows, 3 columns
DateRepIDTargetAmount
1 Jan 202517500
1 Feb 202517500
1 Mar 202517500
1 Apr 202517500
1 May 202519000
1 Jun 202519500
1 Jul 202519500
1 Aug 202517500
1 Sep 202517500
1 Oct 202519000
1 Nov 202519500
1 Dec 202519000

Showing the first 12 of 144 rows.

Measures: [Total Target]

Date 730 rows, 4 columns
DateYearMonthMonthName
1 Jan 202520251Jan
2 Jan 202520251Jan
3 Jan 202520251Jan
4 Jan 202520251Jan
5 Jan 202520251Jan
6 Jan 202520251Jan
7 Jan 202520251Jan
8 Jan 202520251Jan
9 Jan 202520251Jan
10 Jan 202520251Jan
11 Jan 202520251Jan
12 Jan 202520251Jan

Showing the first 12 of 730 rows.

The lesson on time intelligence explains the time functions. Sales were weak in May 2026; the year-to-date value only rises a little there but never drops, which keeps the line readable.

Task 2: growth over the prior year

Task Create the measure "Growth %": how much sales grew compared with the prior year, so (sales minus sales prior year) divided by sales prior year, using DIVIDE.

Orders 221 rows, 5 columns
OrderIDDateCustomerIDRepIDAmount
10014 Jan 202510532850
100216 Jan 202510118730
100319 Jan 202510544650
10041 Feb 202510325210
100511 Feb 2025109511440
100611 Feb 202511162000
100711 Feb 202511323850
100812 Feb 202510325670
100913 Feb 202510427380
101013 Feb 202510958250
101116 Feb 202510117650
101221 Feb 202510126750

Showing the first 12 of 221 rows.

Measures: [Total Sales], [Sales Prior Year]

Customer 16 rows, 3 columns
CustomerIDCustomerIndustry
101Berg Engineering LtdManufacturing
102Northlight Trading CoRetail
103Harbor Logistics IncServices
104Crane Electric plcManufacturing
105Sunfield Markets LLCRetail
106Alpine Tools LtdManufacturing
107Riverside Consulting LLCServices
108Lakeside Print CoServices
109Rhine Steel IncManufacturing
110West End Fashion LtdRetail
111Valley Wine Merchants LLCRetail
112Midland Services LtdServices

Showing the first 12 of 16 rows.

SalesRep 6 rows, 3 columns
RepIDNameRegion
1Emma ClarkeNorth
2Tom WolfNorth
3Ravi PatelSouth
4Lucy EvansSouth
5Sam KerrWest
6Mia LangWest
Target 144 rows, 3 columns
DateRepIDTargetAmount
1 Jan 202517500
1 Feb 202517500
1 Mar 202517500
1 Apr 202517500
1 May 202519000
1 Jun 202519500
1 Jul 202519500
1 Aug 202517500
1 Sep 202517500
1 Oct 202519000
1 Nov 202519500
1 Dec 202519000

Showing the first 12 of 144 rows.

Measures: [Total Target]

Date 730 rows, 4 columns
DateYearMonthMonthName
1 Jan 202520251Jan
2 Jan 202520251Jan
3 Jan 202520251Jan
4 Jan 202520251Jan
5 Jan 202520251Jan
6 Jan 202520251Jan
7 Jan 202520251Jan
8 Jan 202520251Jan
9 Jan 202520251Jan
10 Jan 202520251Jan
11 Jan 202520251Jan
12 Jan 202520251Jan

Showing the first 12 of 730 rows.

This exercise is part of Premium.

Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.

See Premium Already Premium? Log in

The first exercise in this lesson is free.

The measure [Sales Prior Year] already exists, built with CALCULATE([Total Sales], SAMEPERIODLASTYEAR('Date'[Date])). You build the same comparison for products in the year-over-year project of the main course.

Common mistakes

Date column from Orders

TOTALYTD([Total Sales], Orders[Date]) does not accumulate but shows the monthly sales in every row. The exercise then points to the date table.

Growth divided by the current year

The base is the prior year. Dividing by [Total Sales] gives 22.2% instead of 28.5% for the North.

In real Power BI

  • If the year is not over yet, compare year-to-date with the prior year's year-to-date, not with the whole prior year.
  • A line chart with Sales YTD for both years shows at a glance from which month the new year is ahead.

Check your result

  • Task 1: Sales year-to-date are 274,920 in June and 590,940 in December.
  • Task 2: The North grows by 28.5%, the South by 21.4%, the West by 17.9%, all regions together by 23.1%.

Next: case 5, ABC analysis

Every customer gets its sales as a column and a class A, B or C.

Go to case 5

Back to case 3 or the course overview.

Write to us

Choose language

Select your preferred language