Filter file
The JSON file that --filter reads. Cleanup and Save Scope on the page write it for you, and you can write or change it by hand.
trailsbi "D:\Git\Sales workspace" --filter "Sales workspace filter.json"
It has a scope, which says what to build, a filter, which leaves things out of what is built, or both:
{
"scope": {
"workspaces": ["Sales Reports"],
"models": ["Sales"],
"reports": ["Finance/Monthly"]
},
"filter": {
"exclude": {
"reports": ["Scratch*"],
"pages": { "Monthly": ["Test", "Copy of *"] },
"visuals": { "Monthly": { "Overview": ["Debug table", "Card 2"] } }
}
}
}
scope
Lists of names, as for --workspace, --model and --report. They're added to the flags you give, and they choose within a folder with several reports and models.
filter
Either exclude, which leaves out what it names, or include, which keeps only that. Not both.
| Key | What it holds |
|---|---|
reports |
A list of report names |
pages |
For each report, a list of page names |
visuals |
For each report and page, a list of visual names |
- Reports match the way
--reportdoes: the display name, the path or the folder's name, with or without.Report. - Pages have the names that Power BI shows.
- Visuals have the names that TrailsBI shows: the visual's title, or its type and number on the page, such as
Card 2. - Case doesn't matter, and
*and?are wildcards. A report's name can have wildcards as well, so"*"is every report.
Leaving out a report leaves out its pages, and leaving out a page leaves out its visuals. Keeping a visual keeps its page and its report, but not the rest of the page.
When a rule matches nothing
The run goes on and says so, such as No page matches 'Test' in report 'Monthly'. An include that keeps nothing stops the run, and so does a file that isn't in this shape.
Something wrong or missing? Tell us on GitHub.