Repository navigation
Upgrade:
pipx upgrade pbi-cli-tool
First PyPI release since 3.11.1, so it also ships the 3.11.2 fixes below.
Fixed
pbi visual bindno longer wraps every slicer, card and table field as aMeasure. Slicers bound to a dimension column produced aMeasurereference that Power BI Desktop could not resolve, so the slicer rendered broken. The same happened to columns in table visuals and totextSlicer,listSlicerandadvancedSlicerVisual(#19).- Column vs Measure is now resolved per field from the semantic model: first the TMDL or
model.bimthe report'sdefinition.pbirpoints to, then the livepbi connectmodel (opened only for fields missing on disk), then a per-visual role default in which slicers default to Column. Names are canonicalised to the model's casing, and a measure referenced under the wrong table is written against its home table. - Fields not found in the model produce a
warningsentry instead of silently guessing. - A column bound to a value role (chart Y, matrix values, card, table) is now wrapped in the implicit aggregation Power BI Desktop applies, instead of a bare
Columnreference. The function comes from the column'ssummarizeByin the model, falling back to Sum for numeric columns. On charts and matrices a non-summarizable column (text, orsummarizeBy: none) counts, as Desktop does; tables and cards keep it as a plain column. Category, row, legend and slicer fields are never aggregated.
Added
--kind auto|column|measureonpbi visual bindandpbi visual bulk-bindto force the wrapper.--column,--line,--xand--yonpbi visual bind, matchingbulk-bind.--columnbinds table columns and matrix column groups.bindoutput includeskindandresolved_byfor each field.--aggregation sum|average|count|distinct-count|min|max|median|stdev|variance|noneonpbi visual bindandbulk-bindto override the implicit aggregation. Function codes follow Microsoft's PBIR semanticQuery schema.
Also included (3.11.2, never published to PyPI)
Fixed
pbi report reloadis no longer a silent no-op on Windows 11 24H2 and later. Process discovery shelled out towmic, which Microsoft removed from current Windows, so every lookup raisedFileNotFoundError. The bareexceptswallowed it andsync_desktopreported "Power BI Desktop is not running" while it was plainly running. Now uses PowerShell'sGet-CimInstance Win32_Processand parses JSON, so command lines containing quotes survive intact (#17, thanks @BMATPowerBI).- Desktop discovery no longer discards the correct process when the
.Reportfolder is named differently from the.pbip. The hint arriving from the report layer is a.Reportpath, so matching on its stem alone filtered out the match in thin-report layouts. - The save prompt after
WM_CLOSEis polled rather than checked once. Desktop does not raise it promptly when busy (notably straight after a table refresh), so a single check could look before the prompt appeared, send no key, and strand the save. The wait also ends as soon as the process exits, so a close with nothing to save no longer sits out the full timeout. - The close deadline is no longer 20 seconds. Writing a large model routinely exceeds it, and the old limit expired mid-save.
power-bi-reportskill no longer claimspbi report reload"sends a keyboard shortcut" to Power BI Desktop. The actual implementation callssync_desktop(): it saves and closes the open.pbip, re-applies any PBIR edits that Desktop's save would overwrite, then reopens the file. The stale wording was confusing users who expected aCtrl+Shift+F5keypress and looked it up in Microsoft's shortcut docs (#8).- Auto-sync section of the same skill now states explicitly that sync closes and reopens Desktop after each write, so the close/reopen behavior triggered by
pbi visual update(and other write commands) is no longer surprising.--no-syncremains the escape hatch. pbi --versionreports the installed version again.__version__was hardcoded and had drifted to 3.10.10; it is now read from package metadata, so it cannot drift from the released version again (#18).
Security
- Desktop discovery can no longer select the wrong Power BI Desktop instance. The hint predicate matched substrings against every ancestor directory name, so ordinary path components acted as wildcards -- a username directory made an unrelated
Mina_Test.pbipmatch a hint underC:/Users/mina/. Because_find_desktop_processhands its first match to_close_with_save, a false match force-closed, saved and reopened someone else's session. Matching is now exact.
Changed
- The "All Commands" table listed
skills install/list/uninstallalongsidepbisubcommands, though the group is registered on thepbi-clientry point only. It now carries thepbi-cliprefix explicitly (#18).
Removed
src/pbi_cli/utils/desktop_reload.py-- dead code. The Ctrl+Shift+F5 keyboard-shortcut module was an earlier implementation no longer imported anywhere insrc/. The[reload]extras inpyproject.toml(which installspywin32) is unchanged becausedesktop_sync.pystill depends on it.