Show it in Power BI
--embed shows the same views inside a Power BI report. It writes them into the semantic model as a hidden table, and adds a page with the TrailsBI visual to the report.
Set it up
-
Close the project in Power BI Desktop.
-
Look for passwords first: anyone who can open the report can read what is in the table.
trailsbi scan "D:\Reports\Sales"
-
Embed it:
trailsbi "D:\Reports\Sales" --embed
-
Open the project and refresh (Home > Refresh), so the new table loads.
-
Go to the TrailsBI page. It's hidden in view mode, and the visual on it is already set up. The visual is saved inside the report, so there is nothing to import.
The HTML page is written only when you add -o or --open.
When something changes
Run --embed again, then refresh. It replaces the table, even if you renamed it, and never adds a second one. It keeps the TrailsBI page as you left it, and brings the visual up to date. TrailsBI leaves its own table, page and visual out of the analysis.
What it changes in the project
--embed is the only thing in TrailsBI that changes a project's files:
| Where | What |
|---|---|
| The semantic model | The table TrailsBI: one .tmdl file and one line in model.tmdl, or one table in model.bim |
| The report | The TrailsBI page (one folder, and its entry in pages.json), the visual in CustomVisuals, and its entry in report.json |
To take it out again, delete the page and the table in Power BI Desktop.
Reports in the older format
The page needs a report in the PBIR format, the default for Power BI projects since 2025. For an older one, --embed writes the table and says so. Add the visual yourself:
- In the Visualizations pane choose ... > Get more visuals and add TrailsBI from AppSource. Or download
TrailsBI.pbivizfrom its latest release and import it with ... > Import a visual from a file. - Add it to a page.
- In the Data pane, right-click and turn on View hidden, then drag TrailsBI > Chunk onto the visual.
Before you embed
- The table holds the model's names, DAX and data source addresses, and what someone typed into the project, such as a password. A hidden page isn't a protected one: treat the table as readable by anyone who can open the report.
- In the Power BI service, a visual that isn't from AppSource needs the tenant setting that allows visuals created with the Power BI SDK, unless your admin adds it as an organizational visual.
- It works on one report at a time, and not with
--split.
Something wrong or missing? Tell us on GitHub.