Skip to main content
GullySystem
A practical guide

How to set up row level security so each branch sees its own numbers

Ganesh HSStrategy and Technology, GullySystem
Practical advice · 5 min read

In this guide 6 sections
The short answer

Map each user’s sign-in to a branch in a small table, then write one filter rule in the model that reads that table for whoever is signed in. Test it with View as. Give head office a separate role with no filter, so that no manager ever sees another branch’s margin on a page meant for one branch.

Decide what each person may see

Start on paper with every role that opens the report: branch managers, regional heads, finance and the owner, each with the branches they may see. Then mark the figures that stay hidden. Purchase cost and margin are usual candidates.

Look for the awkward cases early. A regional head covers four branches, a finance executive sees every branch but not payroll, and a branch manager who moves between sites keeps changing rows in the map. Each of these shapes the mapping table.

Row level security hides rows. It does not hide columns. If purchase cost must stay hidden from a branch, leave that column out of their report or apply object level security to the field.

Build the user to branch map

Create a small table. It needs two columns: the user’s sign-in email and the branch code; one row per pairing, so the regional head has four rows. Keep it in a place finance can edit, such as a managed sheet or a table in the warehouse, so nobody waits for a developer when a manager moves.

Use the one branch code found in the sales, stock and ledger tables, and if one system calls a branch BR04 while another says Northgate Main, clean that first. Otherwise the filter returns nothing. Every manager then opens a blank page.

Add the map to the model and relate it to the branch dimension, because sales, stock and receivables all hang from that dimension and one filter reaches every table. Relationships do the rest.

  • Sign-in email exactly as it appears in the directory
  • One branch code per row
  • Same code used in every fact table
  • An owner who updates it when people move

Write the rule once in the model

In Power BI Desktop, open Manage Roles and create a role named Branch, then pick the branch dimension to hold the rule. Add a DAX filter that keeps rows whose branch code appears in the map for the signed-in user, which USERPRINCIPALNAME returns. Save the role.

Put the rule on the dimension, not on each report page, so that every new visual inherits it without anyone remembering to copy anything. A rule copied across ten tables gives ten chances to forget one, and the forgotten table leaks a branch’s margin to the wrong manager.

Add an unfiltered role for head office. Assign people to roles in the service through an Entra security group, so a new joiner needs one change, not five separate grants across workspaces.

Test with a branch login

Use View as, pick the Branch role and type a manager’s email, then check totals against the source for that branch. Check every page that carries stock, receivables or targets, because sales alone can look right while a table with no relationship to the branch dimension shows every row.

Then test the failures. A user who is not in the map should see nothing, not everything; a regional head should see exactly four branches. Try a manager with two roles. Access is combined across roles, so a stray head office role quietly widens what that manager can see on every page of the report.

Ask one real branch manager to log in and read the report with you, sitting beside them without touching the mouse. Watch where they hesitate. A missing target line, or a stock figure that looks too low against the last physical count, deserves chasing before the launch email goes out.

  • A user missing from the map sees no data
  • A regional head sees only the assigned branches
  • Totals on screen match the source for that branch
  • Exports and subscriptions respect the same filter

Keep head office a separate view

Do not give head office the branch report with a switch; publish a second version or a separate page set that uses the unfiltered role. That keeps the branch version clean and stops one mistaken assignment from exposing consolidated margin to a whole workspace of branch managers who were never meant to see it.

Document the setup, meaning the roles, the map table, its owner and the steps to add a branch, and keep the page where the next analyst will find it. Review the map every quarter against the HR staff list, removing anyone who has left and rechecking anyone who changed city.

Write the test list down. Run it after every model change. Run it again for every new branch, and keep the dated results beside the access matrix.

Branch access setup sheet

A worksheet of one page in two parts. Part one is the access matrix, with rows for each role and columns for branches seen, figures hidden and the owner. Part two is a test table with columns for the user tested, the expected result, the actual result, the date and who checked it.

Open a blank worksheet to print

Questions owners ask

Does row level security hide columns such as cost price?

No. It filters rows only. To hide a column, leave it out of that audience’s report, or use object level security where your tool supports it.

What happens to a user who is not in the map?

They see no rows. Test this on purpose, since a faulty rule can show everything instead, and a blank page is the safer failure of the two.

Can one person hold more than one role?

Yes, and the access is combined. Someone in both the Branch role and the head office role sees the wider set, so assign roles with care and review the Entra groups every quarter.

Who should maintain the user to branch map?

The owner is the finance or IT manager who hears first when people join, move or leave a branch, and can edit the map the same day. Tie updates to the staff change form.

Browse all guidesBack to top ↑
Next step

Have a specific situation to work through?

This article covers the general case. Tell us what you’re actually dealing with and we’ll respond directly.

Share Your Requirements