set_visual_fields
Change the fields shown in an existing Power BI visual without deleting it, preserving layout and formatting. Define new bindings for table, matrix, or chart roles.
Instructions
Replace the field bindings of an EXISTING visual - change which columns/measures a table/matrix/chart shows WITHOUT deleting it (preserves position, formatting, conditional formatting). bindings = JSON array of {role,table,field,kind}. Roles: tableEx/card=Values; matrix/pivotTable=Rows/Columns/Values; charts=Category/Y/Y2/Series/X/Size. Clears the sort - re-apply with set_visual_sort.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bindings | Yes | JSON array of {role,table,field,kind} | |
| pageName | Yes | ||
| visualName | Yes | ||
| reportSessionId | Yes |