docs: add --no-sync batching guide to report, pages, visuals, filters skills

This commit is contained in:
MinaSaad1 2026-04-07 22:15:51 +02:00
parent dcb48fde7c
commit f7ca7d87e7
4 changed files with 80 additions and 0 deletions

View file

@ -130,6 +130,24 @@ pbi filters add-topn --page overview \
pbi filters list --page overview
```
## Suppressing Auto-Sync (--no-sync)
By default, every write command automatically syncs Power BI Desktop. When
applying filters to multiple pages or visuals in sequence, Desktop reloads
after each command.
Use `--no-sync` on the `filters` command group to batch all filter changes,
then call `pbi report reload` once at the end:
```bash
# Suppress sync while applying filters
pbi filters --no-sync add-categorical --page overview --table "Calendar Lookup" --column "Year" --values "2024"
pbi filters --no-sync add-categorical --page details --table "Product Lookup" --column "Category" --values "Bikes"
# Single reload when all filters are done
pbi report reload
```
## JSON Output
```bash

View file

@ -142,6 +142,25 @@ Page commands inherit the report path from the parent `pbi report` group:
2. Auto-detect: walks up from CWD looking for `*.Report/definition/`
3. From `.pbip`: finds sibling `.Report` folder from `.pbip` file
## Suppressing Auto-Sync (--no-sync)
By default, every write command automatically syncs Power BI Desktop. When
setting up multiple pages in sequence, Desktop reloads after each one.
Use `--no-sync` on the `report` command group to batch all page changes, then
call `pbi report reload` once at the end:
```bash
# Suppress sync while setting up pages
pbi report --no-sync add-page --display-name "Overview" --name overview
pbi report --no-sync add-page --display-name "Details" --name details
pbi report --no-sync set-background overview --color "#F2F2F2"
pbi report --no-sync set-background details --color "#F2F2F2"
# Single reload when all page setup is done
pbi report reload
```
## JSON Output
```bash

View file

@ -94,6 +94,30 @@ Power BI Desktop's Developer Mode auto-detects TMDL changes but not PBIR
changes. This command sends a keyboard shortcut to the Desktop window to
trigger a reload. Requires the `reload` optional dependency: `pip install pbi-cli-tool[reload]`
## Suppressing Auto-Sync (--no-sync)
By default, every write command (`add-page`, `delete-page`, `set-background`,
`set-theme`, etc.) automatically syncs Power BI Desktop after each operation.
When building a report in multiple steps, this causes Desktop to reload after
every single command.
Use `--no-sync` on the `report` command group to suppress per-command syncs,
then call `pbi report reload` once at the end:
```bash
# BAD: Desktop reloads after every command
pbi report add-page --display-name "Overview" --name overview
pbi report set-background overview --color "#F2F2F2"
# GOOD: suppress sync during build, reload once at the end
pbi report --no-sync add-page --display-name "Overview" --name overview
pbi report --no-sync set-background overview --color "#F2F2F2"
pbi report reload
```
`--no-sync` is available on: `report`, `visual`, `filters`, and `bookmarks`
command groups.
## Convert
```bash

View file

@ -212,6 +212,25 @@ accidental mass operations.
| textbox | textbox | (no data binding) |
| page_navigator | pageNavigator | (no data binding) |
## Suppressing Auto-Sync (--no-sync)
By default, every write command automatically syncs Power BI Desktop. When
adding or binding many visuals in sequence, Desktop reloads after each one.
Use `--no-sync` on the `visual` command group to batch all changes, then call
`pbi report reload` once at the end:
```bash
# Suppress sync while building visuals
pbi visual --no-sync add --page overview --type card --name rev_card
pbi visual --no-sync bind rev_card --page overview --field "Sales[Total Revenue]"
pbi visual --no-sync add --page overview --type bar --name sales_bar
pbi visual --no-sync bind sales_bar --page overview --category "Product[Category]" --value "Sales[Revenue]"
# Single reload when all visuals are done
pbi report reload
```
## JSON Output
All commands support `--json` for agent consumption: