tidy_slicer_layout_v2
Tidy Power BI slicer layout: cluster slicers into rows, align baselines, pull off-canvas slicers back, and re-pack with even gaps to remove overlaps. Moves slicers only; sizes and other visuals unchanged.
Instructions
Row-aware slicer tidy (v2): cluster a page's slicers into ROWS, top-align each row onto one shared baseline y (the row median), pull off-canvas slicers back onto the canvas, and re-pack each row with EVEN-GAP spacing (one uniform gap = the median of the row's existing gaps, squeezed only as needed to stay on-canvas), which also clears within-row overlaps. Positions only (sizes NEVER change), slicers only (non-slicer visuals never move); a row wider than the canvas even packed flush is FLAGGED, not forced. Writes the .pbix back offline (Report/Layout patched, DataModel byte-preserved). The .pbix must NOT be open in Power BI Desktop. Returns { ok, rows:[{page,row,y,members,aligned}], moveCount, moves:[{page,slicer,row,reason,before,after}], flaggedCount, flagged, persistedToDisk }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | optional: a single page (name/displayName, loose match) to tidy; omit to tidy ALL pages | |
| pbix | Yes | absolute path to the .pbix (must be CLOSED in Power BI Desktop) |