DNC DE NORONHA CONSULTING

Blog / Data Management · · 8 min

Power BI without Power BI Desktop: reports as code in Fabric

How I build Power BI reports with Fabric, Git, PBIR and Claude, without Power BI Desktop, in one house style and published through one app with audiences.

A visual.json file connected by a dashed line to a bar chart

I work on a Mac. Power BI Desktop only runs on Windows. For years that meant starting a virtual machine to move a single chart. Not any more. At one client I now build every report as code: JSON files in a Git repo, connected to a Fabric workspace, with Claude as my build partner. Here is the recipe.

Why I dropped Desktop

A .pbix is a binary box. You can’t see what changed, you can’t review it, and every report ends up with a slightly different font size, colour or margin. After a few years you have thirty reports in ten workspaces, scattered across personal folders, and nobody knows which ones are still in use.

Three things changed that:

Since early 2026 PBIR has been the default: from January in the service, from March in Power BI Desktop as well. The format is now generally available, and a report in the old format is converted automatically as soon as you edit and save it. So it is no longer an experiment.

The architecture at a glance

LayerWhatWhy
DataSQL database with a separate reporting schemaOne place for reporting logic
AccessService account with read-only rights on that schemaNo personal accounts in datasets
Model and reportFabric workspace on a small capacityOne workspace, everything in one place
Source codeGit repo with PBIR, TMDL and SQL viewsVersion control, review, repeatability
BuildEditor + Claude, with Power BI MCPNo Desktop needed
DistributionOne Power BI app with audiencesUsers only see what is meant for them

Step 1: a reporting schema and a service account

Start with the database, not with Power BI. I never give Power BI access to the operational tables. Everything a report needs goes into its own schema, for example ra (reporting/analytics), as a view.

-- Once: the schema and a role with read-only rights
CREATE SCHEMA ra AUTHORIZATION dbo;
GO
CREATE ROLE powerbi_reader AUTHORIZATION db_owner;
GRANT SELECT ON SCHEMA::ra TO powerbi_reader;

-- The service account Power BI uses
CREATE USER powerbi_app_reader FOR LOGIN powerbi_app_reader;
ALTER ROLE powerbi_reader ADD MEMBER powerbi_app_reader;

A few rules I stick to strictly:

  1. One view per report. The name refers to the report: ra.vw_powerbi_<report>. That way you know who uses each view.
  2. No logic in Power BI. The view delivers exactly what the report shows. Calculations in SQL are testable and reusable; calculations in Power Query get lost.
  3. Views as idempotent scripts in the repo. CREATE OR ALTER VIEW, numbered, with the report that uses the view noted at the top.
  4. Make use of ownership chaining. If all schemas have the same owner, a view in ra can read other schemas internally, while the service account only sees ra.

The service account’s password lives in the password manager and nowhere else. In Fabric you set it once as the connection’s credential.

Step 2: one Fabric workspace, connected to Git

Create one workspace on a Fabric capacity. For a mid-sized organisation an F2 is enough to start with. Connect the workspace to a repo and branch via Workspace settings → Git integration. Git integration works on Fabric, Premium and PPU workspaces.

Then:

  1. Commit all from the workspace. Reports and semantic models land in the repo as folders.
  2. Clone the repo locally. From then on you work in files.
  3. Change, commit and push. In Fabric you click Update from Git and the report is live.

In the repo, a PBIR report looks like this:

Revenue.Report/
├── definition.pbir                      # link to the semantic model
├── definition/
│   ├── report.json                      # theme and report settings
│   └── pages/<pageId>/
│       ├── page.json
│       └── visuals/<visualId>/visual.json   # one file per visual
└── StaticResources/
    ├── SharedResources/BaseThemes/      # the theme
    └── RegisteredResources/             # logo
Revenue.SemanticModel/                   # the model in TMDL

When report and model sit in the same workspace, definition.pbir points to the local model with byPath. Fabric exports it that way by itself. If an older report still has a byConnection to a workspace elsewhere, convert it. That prevents reports that quietly keep looking at an old environment.

Step 3: one house style for every report

Because every report is made of the same building blocks, you can pin down the look and feel instead of redrawing it per report:

The result: a user who opens three reports sees the same layout three times. That saves explanation and builds trust in the numbers.

Step 4: Claude as build partner

This is where it gets fun. PBIR is documented JSON, so Claude can read and write it. I give Claude Code the repo, the design document and a request such as: “Create a report Casks per owner on view ra.vw_powerbi_casks_owner, with a table and two KPI cards, in the house style.” Claude creates the view, the model, the page and the visuals. I review the diff, commit and push.

So I don’t build blind, I connect Claude to Microsoft’s MCP servers for Power BI. There are two, each with its own role:

Since September 2026 Microsoft has bundled these servers with agent skills in the Power BI agentic experiences, including a skill for building and validating PBIR reports. It can also validate a report in the browser, without Desktop. The skills work with Claude Code as well.

A practical point: don’t register the local and the hosted authoring server at the same time. The agent then sees two overlapping sets of tools and doesn’t always pick the right one.

I also keep a small check script in the repo. It reads every report and checks that (a) each report only uses objects from ra, (b) each view in use exists as a script in the repo and (c) the view exists in production and is readable by the service account. It runs before every commit. Views that nobody uses any more show up in the output as clean-up candidates.

Step 5: one app with audiences

Users don’t get access to the workspace. They get the Power BI app. In an app you create audiences, up to 25 per app: Finance sees the financial reports, Sales the sales reports, the management team sees everything. One app, one link, and everyone only sees what is meant for them. Assign audiences to Entra groups, not to individual people.

Mind the licences. On a small capacity such as an F2, every app user needs a Power BI Pro or PPU licence. Only from F64 upwards is a free licence enough to view the app.

A landing page in the app helps: a simple report with an explanation and links to the most important reports per audience.

Keep workspace roles (Admin, Member, Contributor) limited to the people who build. Manage that through the Fabric admin portal, with admin roles through Privileged Identity Management.

Migrating: report by report

With an existing sprawl of .pbix files, you start with an inventory. The Power BI Admin API and the activity log show for each report where it lives, who opens it and how often. Many reports turn out to interest nobody any more.

Then, per report:

  1. Decide: move it, merge it or throw it away.
  2. Read the sources: which tables and which SQL in Power Query.
  3. Create the view in ra and test it as the service account.
  4. Build the report as code in the repo, on the new view.
  5. Put it in the app, for the right audience. The old report goes once the users agree.

A few lessons from practice:

Reporting is now just software development

The biggest gain isn’t that I no longer need Windows. It’s that reporting gets the same discipline as the rest of the software: version control, review, repeatable deployments and a clear separation between data, logic and presentation. Claude speeds up the building, but the real win is in the agreements: one schema, one service account, one workspace, one house style, one app.

Want to set this up in your own organisation? Get in touch.


Sources and references:

#power-bi ·#fabric ·#pbir ·#claude ·#mcp ·#how-to

← All posts