Chapter: 9 Publishing and Sharing Your Report
You have cleaned your data, built a star schema, defined indicators with DAX, and designed a dashboard. Right now, all of that is trapped on your laptop.
A dashboard only becomes a monitoring system when it reaches the people who make decisions, with the right people seeing the right data. This chapter covers that final step: from Power BI Desktop to the Power BI service.
Licensing, prices and features in this chapter were checked against Microsoft’s documentation in October 2026. They change regularly; check the linked pages before you make purchasing decisions.
9.1 Desktop and Service
| Power BI Desktop | Power BI service | |
|---|---|---|
| What it is | Free Windows application | Website (app.powerbi.com, also reachable through the Microsoft Fabric portal at app.fabric.microsoft.com) |
| Used for | Connecting, cleaning, modeling, writing DAX, designing | Sharing, refreshing, securing, viewing |
| Who uses it | Analysts | Analysts and everyone who reads the reports |
When you publish, Power BI creates two items in the service: a semantic model (the tables, relationships and measures; formerly called a dataset) and a report (the pages and visuals).
Rule of thumb: Never email a
.pbixfile to stakeholders. It contains the full data, has no security, and is out of date the moment it is sent. Publish it instead.
9.2 Before You Publish: Accounts and Licenses
9.2.1 You need a work or school account
Microsoft’s documentation states that you need a work or school email
account to sign up for the Power BI service; consumer accounts such as
Gmail or Hotmail can’t be used directly. If you are learning on your own
without one, Microsoft’s suggested route is a Microsoft 365 trial,
which creates a work account (ending in onmicrosoft.com) and a new
organisation. It requires a credit card, and you should cancel it within
30 days if you don’t intend to pay.
9.2.2 Licenses
Every user of the Power BI service has a per-user license. The three types:
| License | What it allows | Price (Oct 2026) |
|---|---|---|
| Free | Create and view content in your own My workspace. Cannot share, and cannot view content others share in standard workspaces. | Free |
| Pro | Publish to shared workspaces, share content, view content shared by others | US$14 per user per month, paid yearly |
| Premium Per User (PPU) | Everything in Pro, plus Premium features such as 48 refreshes per day and larger models | US$24 per user per month, paid yearly |
For sharing in the standard set-up, both the person sharing and every person viewing need a Pro (or PPU) license.
The exception is capacity. If your organisation buys Microsoft Fabric capacity of size F64 or larger, users with only a Free license can view Power BI content in workspaces on that capacity, as long as they have the Viewer role. On smaller capacities (F2 to F32), viewers still need Pro or PPU. Microsoft is retiring the older Power BI Premium “P” capacities in favour of Fabric “F” capacities.
For a programme with many occasional viewers, such as district officers, compare the cost of Pro licenses for everyone with the cost of a capacity.
9.4 Step 1: Publish
- Save your
.pbixfile. - On the Home tab in Power BI Desktop, select Publish.
- Sign in with your work or school account if prompted.
- Choose the destination workspace. (With a Free license, choose My workspace.)
- When publishing succeeds, select the link to open the report in the browser.
9.5 Step 2: Keep the Data Fresh
A dashboard showing last quarter’s data is an archive, not a monitoring tool. The service can refresh the semantic model on a schedule, but only if it can reach the data.
9.5.1 Where is your data?
- Files on your own computer (like the book’s CSV files in a local folder): the service can’t reach them. Scheduled refresh would need an on-premises data gateway installed on a computer that is always on.
- Files on OneDrive for work or school or SharePoint Online: the service can reach them without a gateway. Power BI also checks roughly every hour for changes to a file connected this way. For a small team working with exported CSV or Excel files, storing them in SharePoint is usually the simplest set-up.
- On-premises databases and servers (a local SQL Server, a DHIS2 instance inside a government network): need a gateway. Microsoft recommends the standard (enterprise) gateway rather than a personal gateway.
- Cloud services reachable over the internet: usually no gateway. But if one query combines a cloud source with an on-premises source, the gateway is used for both.
9.5.2 Schedule the refresh
- In the service, open the workspace and find the semantic model.
- Select More options (…) → Settings.
- Under Data source credentials, sign in to each source.
- Under Refresh, turn on the scheduled refresh and add times.
Limits and behaviour to know:
- Semantic models in shared capacity (Pro) can have up to 8 scheduled refreshes per day; on Premium, PPU or Fabric capacity, up to 48.
- Refresh failures are emailed to the semantic model owner. Leave this notification on.
- If nobody opens a report built on the semantic model for two months, Power BI pauses the schedule and emails the owner.
9.7 Row-Level Security (RLS)
In public health, one dashboard often serves the whole country, but:
- a state team should see only its own state;
- the national team should see everything.
You don’t need separate reports. Row-level security filters the data according to who is signed in.
9.7.1 Exercise 9.1: A static role per state
- In Power BI Desktop, on the Modeling tab, select Manage roles.
- Select New and name the role
State A. - Under Select tables, choose
dim_facility. Add a filter wherestateequalsState A(in the default editor), or switch to the DAX editor and enter:
[state] = "State A"
- Select Save. Create
State BandState Cthe same way. - Test it: on the Modeling tab, select View as, choose State A, and select OK.
Expected: Total Visits shows 4,483 and the state table shows
only State A. Select Stop viewing to return to the full data.
The filter on dim_facility flows through the relationships to
fact_patient_visits and fact_targets, so every measure respects it.
- Publish the report. In the service, open the workspace, select More options (…) on the semantic model, then Security. Add each person (or a Microsoft Entra security group) to their role.
- Use Test as role in the service to check what each role sees.
You assign people to roles only in the service, not in Desktop.
9.7.2 Dynamic RLS: one role for everyone
With many states or districts, maintaining one role each becomes tedious. Dynamic RLS uses one role and a table that maps users to what they may see.
- Create a table
user_accesswith two columns,emailandstate, listing each person’s sign-in address and the state they may see. - Create one role,
By state, with this filter ondim_facility:
[state]
IN CALCULATETABLE (
VALUES ( user_access[state] ),
user_access[email] = USERPRINCIPALNAME ()
)
- Hide
user_access. In the service, add everyone who needs access to theBy staterole.
USERPRINCIPALNAME() returns the signed-in user’s sign-in name (UPN). It
usually matches the email address, but not always. Microsoft’s guidance
is to store exactly the value USERPRINCIPALNAME() returns, and to test
with real accounts, because Test as role evaluates dynamic rules with
your identity.
9.7.3 RLS rules you must know
These points come from Microsoft’s RLS documentation:
- RLS applies only to the Viewer role. Workspace Admins, Members and Contributors are not filtered. Give restricted users the Viewer role or an app, never a higher role.
- Users who aren’t in any role typically see no data once roles exist on a semantic model.
-
Roles are additive. Someone in both
State AandState Bsees both. - RLS filters rows, not columns. To hide whole columns, Microsoft offers object-level security.
-
USERELATIONSHIPmay cause errors when RLS is enabled. TheART Initiationsmeasure from Chapter 7 uses it. After adding roles, test that measure with View as. If it errors, use Microsoft’s alternative for role-playing dates: a separate date table for ART start date (for example, a referenced copy ofdim_datenameddim_art_start_date) with an active relationship toart_start_date, and count patients withoutUSERELATIONSHIP.
9.8 Never Use “Publish to Web” for Health Data
The service has an option, File → Embed report → Publish to web (public). Microsoft’s own warning: anyone on the internet can view a report published this way, with no sign-in, and that includes the detailed data in the model, even data the report doesn’t display.
For patient-level or programme data, do not use Publish to web. It also isn’t available for reports that use row-level security. To put a report on an internal portal or SharePoint, use Embed or Embed in SharePoint Online, which keep permissions and security in place.
Ask your Power BI administrator if Publish to web is disabled for your organisation; many organisations turn it off.
9.9 Other Ways to Protect and Govern
- Endorsement. Mark a trusted semantic model as Promoted or Certified so colleagues build on the official indicators rather than their own copies.
- Sensitivity labels. If your organisation uses Microsoft Purview Information Protection, apply the appropriate label to reports and semantic models.
-
Version control. Saving as a Power BI Project (
.pbip) stores the model and report as text files that can be tracked in Git, so you can see exactly what changed in an indicator and when.
9.10 Mobile Access
Published reports are available in the Power BI mobile apps for iOS and Android. If you created mobile layouts (Chapter 8), they appear when the phone is held upright. Mobile users are subject to the same permissions and RLS.
9.11 Final Hands-On: Publish Your Work
- Publish: In Power BI Desktop, select Publish and choose My workspace.
- Open: Select the link to open the report in the browser.
- Interact: Use the slicers. The report behaves as it did in Desktop.
- Check: Confirm the headline card shows 7,062 malaria tests and 89.9% of target.
- Explore the semantic model settings: find the Refresh and Data source credentials sections. Because the CSV files are on your computer, scheduled refresh would need a gateway, or the files moved to OneDrive or SharePoint.
9.12 Conclusion: You Are Now a Data Steward
We started with a folder of messy CSV files. You have learned to:
- Clean data with documented, repeatable steps in Power Query.
- Connect tables in a star schema that filters predictably.
- Calculate indicators once, as DAX measures, with explicit numerators and denominators.
- Visualize them clearly, accessibly, and without exposing small numbers.
- Share them securely, so the right people see the right data.
Power BI changes every month. The principles in this book do not: structure, clarity, and responsibility.
Go build something that matters.
Power BI for M&E and Public Health Data Analysts · The Growing Analyst