Sales Territory Balancer — a Power BI custom visual by TCViz · Last updated: 7 October 2026
Version 1.0.0.0 Methodology: how every number is computed What's new VideoGive it your points of sale — where they are and how much work each one takes — and it tells you how many salespeople you need and proposes a territory for each one. It works on two levels: first commercial areas (your own — province, region, delegation — or drawn by the visual), then, inside each area, territories of at most one salesperson's monthly hours, travel included. Everything is computed inside Power BI: no external service, no network requests, and the locations of your customers never leave your report. The parameters live in a bar inside the visual, so readers can try "what if a salesperson had 120 hours" in reading view.
This page is the user guide. How the figures are computed, the assumptions behind them and the references are in the Methodology.
| Well | Accepts | Notes |
|---|---|---|
| Customer ID | Any identifier | One row per point of sale. Shown in the tooltip and the CSV export, and used to sort the clients so the result never depends on row order. |
| Latitude, Longitude | Numeric, decimal degrees | Required. Rows with values out of range are ignored. |
| Visits per month | Numeric | How often the point is visited; 0.5 means every two months. |
| Minutes per visit | Numeric | Time on site per visit. Without Visits and Minutes every point counts as one hour of visits a month, and the split is by number of clients. |
| Postal code | Text or number | Optional. Bind it if you assign territories by postal code: each territory is then made of whole postal codes, so a code belongs to one salesperson (only codes with more work than one salesperson are shared), and automatic areas are made of whole codes too. A code spread over a wide area (a capital's code given to a whole province, say) is split into its towns, and a column that is not geographic at all is ignored — the map says so. The code goes into the CSV export. |
| Speed (km/h) Pro | Numeric | Travel speed around this point — e.g. 25 in a city centre, 45 in its outskirts, 70 in the countryside. Overrides the bar's km/h for that point. |
| Area Pro | Any text | Your commercial areas. Each client stays in its own Area value; territories are built inside each area and never cross it. When bound, the bar's Areas number is ignored. |
| Tooltips | Measures | Extra values on hover; report tooltip pages are supported. |
The bar sits inside the visual, above the map, and works in reading view. In edit mode its values are saved with the report; in reading view a reader can change them and nothing is written back.
| Control | What it does |
|---|---|
| Hours / salesperson / month | Field hours available per month to one salesperson, visits and travel included (e.g. 20 days × 7 h = 140). It is the size of a territory — a hard cap — and the salespeople needed are the workload divided by it. |
| km/h | Average travel speed for every point without a Speed of its own. 45 is a reasonable mix of town and road. |
| Road × | Road distance over straight-line distance. Set it for your country: published averages are about 1.2 for the United States, 1.3 for India, 1.5 for Mexico and 1.6 for Spain (see the Methodology). Higher means more travel and more salespeople. |
| Areas | Number of commercial areas to draw automatically when no Area field is bound. They follow geography and do not balance hours: an area that needs 12 salespeople next to one that needs 2 is a correct answer. Areas only join regions that share a land border, so they never reach across a gulf or the sea; islands and archipelagos (Balearic Islands, each Canary province, Azores, Sicily, Crete, Hawaii…) get an area of their own, named after them, on top of the number you type. 0 = nothing is computed. |
| Recalculate | Runs the calculation again. Changing a value and pressing Enter does the same. |
| Export CSV Pro | Downloads customer_id, area, territory, load_hours_month for every client, plus postal_code when bound. |
| Export map PDF Pro | Saves the map as you see it — outlines, points, area badges and legend — at twice the screen resolution, on a one-page PDF. PDF because Power BI does not let a visual download image files such as PNG; it pastes into a slide and prints well. |
| Card | Settings |
|---|---|
| Territories | Working days / month (20): a working day is the hours per salesperson divided by this, and the visits that fit in a day share one trip out and back. Outlier distance (km) (0 = off): a client whose third-nearest client is farther than this is drawn hollow and left out of the calculation, for you to decide. |
| Area badges | Show, shape (circle or rectangle), font, size, text, background and border colours, border width. |
| Map | Marker size. |
| Free | Pro |
|---|---|
| Everything above with automatic areas: workload and travel model, salespeople needed per area, territories, outlines, filters, bookmarks, tooltips, high contrast, English and Spanish. | Your own Area field, Speed per point, Export CSV and Export map PDF. |
While you edit a report without a licence, Area and Speed work under a "Pro preview" watermark so you can see what they add; in reading view the free result is shown. The exports show a note and, where Power BI can check licences, its own purchase link.
Each client's workload is its visit time plus travel. Travel is estimated, not routed: each visit pays the hop to the next client and its share of a daily trip out to the territory and back — the continuous approximation used in logistics planning. Areas come from your field or are grouped automatically, respecting land borders. Inside each area and each island, territories are built from the towns outward, compact, with one salesperson's hours as a hard limit. Salespeople needed = workload ÷ hours per salesperson. The same data and parameters always give the same result. More in the Methodology.
Territories are built inside areas, so the visual waits until there are areas: bind an Area field or type a number in Areas. Until then it shows your points in grey and says so.
With the Area field, each client goes exactly where your data puts it — the visual never overrides it, because a company may assign a town across a provincial border on purpose. If a client labelled "Madrid" sits in Guadalajara, check the value in your data. For areas drawn purely by location, leave Area empty and type a number in Areas.
Because balancing hours and keeping geography sensible pull in opposite directions, and at the scale of a region the hours must lose. A region is a management unit — "Aragón needs 12.4" is useful; "Aragón minus two towns that go with Catalonia" is not. So areas follow geography with no size constraint, and the hours are balanced where it matters: between the salespeople inside each area.
No — straight line multiplied by the road factor, which you set for your country. Real routing needs an online service, which would mean sending your customers' locations over the network. The model is for sizing and designing territories, not for planning the day's route; see the assumptions and limitations.
Downloads from custom visuals are governed by a Power BI tenant setting that is off by default and applies to Power BI Desktop as well as the service: Allow downloads from custom visuals, under Tenant settings → Power BI visuals in the Fabric admin portal. Ask your administrator to enable it, make sure you are signed in to Power BI, and try again. Before the first download Power BI asks you to confirm you trust the visual. The file is generated inside the visual and handed to Power BI's own save dialog; nothing is uploaded anywhere.
A street map means fetching tiles from a third-party server, and every tile request would tell that server which area you are looking at. So the visual makes no network requests at all and draws embedded outlines instead: country borders and first-level regions (states, provinces, departments) for every country, from Natural Earth, simplified to a few kilometres. Only the outlines around your data are drawn.
No. Power BI custom visuals can read the data they are given but cannot modify the dataset. The visual is a design and simulation tool: tune, look, decide, then carry the assignment across with the CSV export.
All of them. Power BI hands the rows over in blocks of 30,000; the visual asks for the next block until it has every row ("Loading points… 30,000 so far"), then computes on the full set ("Balancing 41,260 points…"). The only ceiling is the memory Power BI gives a visual. On the sample data, 20,000 clients take about 5 seconds and 41,000 about 10; a few thousand take a second or two.
No, if the data and the parameters have not changed: the last result is kept in your browser through Power BI's local storage, and the map comes back at once. It computes again when something changed, when the result is more than 29 days old, when you are not signed in, or when your administrator has switched off Allow access to the browser's local storage. The result of about 40,000 clients fits; for much larger models it may not, and the visual computes again.
Customer ID is not bound, so Power BI aggregated every coordinate into one value. Bind an identifier with one row per point of sale.
It is workload ÷ hours per salesperson, travel included. Check the units: Minutes per visit must be minutes, and Hours / salesperson / month must be monthly hours. Then check the road factor and speed: they decide the travel share, which you can see per client in the tooltip.
The visual makes no network requests and needs no companion service. To avoid computing again when you come back to a page, it keeps its last result — the territory number of each client, nothing from your data — in your browser through Power BI's local storage. See the Privacy Policy.
Support: support@tcviz.com