agentleFS
wardawgmalviciouswardawgmalvicious/agent-config/skills/powerbi/pbir-bookmarks/SKILL.md

pbir-bookmarks

Skill1 starsChanged 56 days agoMITView on GitHub

Use when creating, editing, or wiring Power BI PBIR bookmarks in Report.Report/definition/bookmarks/ — bookmarks.json index and individual bookmark.json files. Covers bookmark structure (name hex ID matching items[], displayName, options, explorationState), options flags (targetVisualNames, suppressDisplay, suppressActiveSection, suppressData, applyOnlyToTargetVisuals), explorationState shape (activeSection page ID, filters.byExpr, per-page sections.visualContainers.singleVisual, objects.merge for filter-pane state), per-visual display.mode hidden/visible as the ONLY correct visibility toggle (NOT root-level isHidden), byExpr entries with required expression + optional filter + howCreated (0=visual, 1=report), patterns (toggle, reset filters, guided navigation), wiring bookmarks to buttons via visualLink actions targeting the hex name.

The file

Files
SKILL.md

PBIR Bookmarks Reference

Bookmarks capture a snapshot of report state — active page, filter selections, visual visibility, and object overrides. Used for toggle interactivity via button visualLink actions.

File Layout

Report.Report/definition/bookmarks/
  bookmarks.json                       # index + display order
  <hex_id>.bookmark.json               # one per bookmark

bookmarks.json

{
  "$schema": ".../bookmarksMetadata/1.0.0/schema.json",
  "items": [
    {"name": "958f29ad733c047ee0b8"},
    {"name": "54698b9cd0a0c57906b7"}
  ]
}

Order in items[] = order in the Bookmarks pane.

[id].bookmark.json Top-Level

PropertyTypeNotes
$schemastring.../bookmark/1.4.0/schema.json
namestring20-char hex; must match entry in bookmarks.json
displayNamestringLabel shown in Bookmarks pane
optionsobjectApply behavior flags
explorationStateobjectThe actual state snapshot

options

PropertyTypeNotes
targetVisualNamesstring[]Visuals affected by this bookmark (empty/omitted = all)
suppressDisplaybooleantrue = don't change visibility when applied; preserves current show/hide state
suppressActiveSectionbooleanDon't change the active page when applied
suppressDatabooleanDon't restore filter / slicer state
applyOnlyToTargetVisualsbooleanOnly touch visuals in targetVisualNames

explorationState

"explorationState": {
  "version": "1.3",
  "activeSection": "<page_hex_id>",
  "filters": {"byExpr": [...]},
  "sections": {
    "<page_id>": {
      "visualContainers": {
        "<visual_id>": {
          "singleVisual": {
            "display": {"mode": "hidden"},
            "objects": {"merge": {...}},
            "activeProjections": {...}
          },
          "filters": {"byExpr": [...]}
        }
      }
    }
  },
  "objects": {"merge": {"outspacePane": [{"properties": {...}}]}}
}
PathDescription
versionBookmark schema version (e.g. "1.3")
activeSectionPage ID active when bookmark applied
filters.byExpr[]Report-level filter state snapshot
sections.<page>Per-page overrides
sections.<page>.visualContainers.<visual>Per-visual state
objects.mergeReport-level UI state (filter pane visible/expanded, etc.)

Per-Visual State (singleVisual)

PathNotes
display.mode"hidden" or "visible" — show/hide mechanism
objects.mergeMerge these formatting properties over base visual.json
activeProjectionsActive drill-down field selection
filters.byExpr[]Visual-level filter snapshot

Hiding / showing a visual via bookmark is driven by display.mode, NOT by changing the visual's root isHidden.

display.mode: "hidden" does not hide a visual from Copilot. In the Power BI service, Copilot Summary and the Copilot Narrative visual read visuals that are hidden by default and revealed by a display-only report bookmark — the options.suppressData: true shape below. Copilot reads them in place, so bookmark state is unchanged and RLS/OLS stay enforced. This is a disclosure-surface change rather than a permissions bypass: content an author may have assumed was excluded from generated narrative text is not.

Two upstream qualifiers, both encodable here: the bookmark must be display-only (no data/filter state), and it must be reachable via a bookmark button or navigator — "bookmarks without a user-facing affordance are excluded", so an unwired bookmark is not read. Personal bookmarks and visuals on hidden pages are excluded too. Source: Summarize a report with Copilot, drilled 2026-09-08.

byExpr Filter Entry

{
  "name": "d3f20cea05c37b47123a",
  "type": "Categorical",
  "expression": {
    "Column": {
      "Expression": {"SourceRef": {"Entity": "Date"}},
      "Property": "Calendar Month (ie Jan)"
    }
  },
  "filter": {
    "Version": 2,
    "From": [{"Name": "e", "Entity": "Date", "Type": 0}],
    "Where": [{"Condition": {"In": {
      "Expressions": [{"Column": {"Expression": {"SourceRef": {"Source": "e"}}, "Property": "Calendar Month (ie Jan)"}}],
      "Values": [[{"Literal": {"Value": "'Jan'"}}]]
    }}}]
  },
  "howCreated": 1
}
FieldNotes
nameMatches the name of the filter in filterConfig
typeSame types as filters: Categorical, Advanced, TopN, RelativeDate, etc.
expressionRequired — the field the bookmark tracks
filterOptional — omit when the field is tracked but has no active selection
howCreated0 = visual-level, 1 = report-level

Same SourceRef.Source alias rule as regular filters: Where conditions reference the alias from From[], not Entity.

Common Patterns

PatternHow
Toggle visual visibilityTwo bookmarks with opposite singleVisual.display.mode values; wire to buttons via visualLink actions
Reset all filtersEmpty byExpr[] entries, or filter.Where: [] per field
Guided navigationChain bookmarks, each setting activeSection + pre-set filters
Freeze visibility on filter-only bookmarkoptions.suppressDisplay: true
Freeze filter state on visibility-only bookmarkoptions.suppressData: true
Scope to subset of visualsoptions.targetVisualNames + applyOnlyToTargetVisuals: true

objects.merge Example

Override title text on a single visual in a bookmark:

"singleVisual": {
  "display": {"mode": "visible"},
  "objects": {"merge": {
    "title": [{"properties": {
      "text": {"expr": {"Literal": {"Value": "'Quarterly View'"}}}
    }}]
  }}
}

Report-level — collapse the filter pane when applied:

"objects": {"merge": {
  "outspacePane": [{"properties": {
    "expanded": {"expr": {"Literal": {"Value": "false"}}}
  }}]
}}

Wiring to a Button

Buttons apply a bookmark via a visualLink action type on the button's onClick in its visual.json. The action payload references the bookmark's name (the hex ID).

Gotchas

IssueCauseFix
Bookmark not listed in paneMissing entry in bookmarks.json.items[]Add {"name": "<hex>"} — order here controls pane order
Bookmark applies but nothing changessuppressDisplay and suppressData both trueLoosen the flags
Visibility toggle has no effectUsed root-level isHidden instead of singleVisual.display.modeUse display.mode: "hidden" / "visible" in explorationState
Bookmark filter ignoredMissing expression on byExpr entryexpression is required even when filter is omitted
Filter state jitters on toggleInconsistent field set between bookmarksInclude the same byExpr entries in every bookmark that participates in the toggle
Wrong page opensactiveSection out of sync with page renameUpdate activeSection to the new page hex ID
SourceRef used Entity in WhereSame gotcha as filtersUse {"Source": "<alias>"}
Button doesn't fire bookmarkWrong bookmark name in action payloadMust match hex name, not displayName
Partial visual updatetargetVisualNames includes wrong IDsVerify visual name values — these are the root-level IDs, not displayNames
howCreated wrong scope0 vs 1 mixed up0 = visual-level filter, 1 = report-level filter

Reference

See also

  • pbir-visual-json — visual name IDs targeted by bookmarks and button actions
  • pbir-filters — byExpr uses the same SQExpr / SourceRef.Source shape

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.