Case 6: territory report with a role

The dashboard goes to the territory managers. Each should see only their team, the title should name the region, and every rep's share should refer to total sales.

In short: the role [Region] = "South" on the SalesRep table filters everything related to SalesRep. The title comes from "Sales " & SELECTEDVALUE(SalesRep[Region], "all regions"), the share from DIVIDE([Total Sales], CALCULATE([Total Sales], ALL(SalesRep))).

Task 1: the role for the South

Task The South territory manager should only see their team's sales in the published dashboard. Write the table filter DAX expression of the role for the SalesRep table: only the South region.

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.

In Power BI Desktop you create the role under Modeling, Manage roles, and test it with View as. More in the lesson on publishing and sharing.

Task 2: the title

Task The dashboard title should name the selected region. Create the measure "Report Title": "Sales " followed by the region, or "all regions" when none or several are selected.

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.

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.

With the role only one region is ever in the filter, so the title reads "Sales South". Without a role and without a selection, the alternate value applies.

Task 3: every rep's share

Task How much does each rep contribute to total 2026 sales? Create the measure "Sales Share": [Total Sales] of the row divided by [Total Sales] of all reps.

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.

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.

ALL(SalesRep) only removes the rep filter, as in the lesson on percent of total.

Common mistakes

Region name misspelled

"Sout" instead of "South" matches no row. The role then sees no data at all, and the matrix stays empty.

Role on the Customer table

Customers have no region in the model; the region belongs to the rep. The rule therefore goes on SalesRep.

In real Power BI

  • Row-level security applies to people with the Viewer role in the workspace. Anyone who administers or edits the workspace sees all data.
  • The role filters the whole model, and ALL does not remove that. For the South territory manager the denominator from task 3 is therefore the South's sales, not the whole company's.

Check your result

  • Task 1: With the role the 2026 matrix shows Manufacturing 74,880, Retail 57,520 and Services 24,660, together 157,060.
  • Task 2: The rows read "Sales North", "Sales South" and "Sales West", the total row "Sales all regions".
  • Task 3: Sam Kerr contributes 22.6% of 2026 sales, Mia Lang 8.5%.

Done: all six cases

Your course view shows which tasks are still open and where you request the "Power BI for Sales" certificate.

Go to the course view

Back to case 5 or the course overview.

Write to us

Choose language

Select your preferred language