Leave pages out

Power BI projects collect throwaway work: test pages, copies of pages, scratch reports and debug visuals. Cleanup leaves them out of the whole analysis, so every view covers only what is real.

Tables, columns and measures that only the left-out items used then show in Health as unused.

Mark what to leave out

  1. Open the page, go to Reports and click Cleanup.
  2. Choose Leave out marked, or Keep only marked when four pages are live and everything else is a test.
  3. Mark reports, pages and visuals with their buttons, by clicking visuals on the canvas, or in List View, which has all of them with a search box.
  4. Click Save Filters. Your browser saves a filter file, such as Sales filter.json.

Then build again with it:

  • trailsbi "D:\Git\Sales workspace" --filter "Sales filter.json"

Add any -m, -r or -w that you built with before.

What you get

The page has a Filter chip in its toolbar. It opens a summary: what was analysed, each rule and what it matched, and everything left out. Cleanup on that page starts from the same marks, so you can change them and save again.

Nothing in the project is changed. A run without --filter has everything again.

What a mark takes with it

  • 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.
  • A report with every page left out is left out too.