set_button_state_cf
Set button state colors in Power BI using a measure that returns hex values, applying to fill, text, or icon for default, hover, pressed, or selected states.
Instructions
Measure-driven per-STATE button formatting: a measure returning a hex colour drives a button's fill/text/icon colour for a given state. state=default|hover|pressed|selected; target=fill|text|icon. button is the actionButton's visual name. colorMeasure = "Table[Measure]".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | page name or displayName | |
| state | No | default | hover | pressed | selected | default |
| button | Yes | the button visual name | |
| target | No | fill | text | icon | fill |
| colorMeasure | Yes | the colour measure, "Table[Measure]" | |
| reportSessionId | Yes | ||
| colorMeasureTable | No | the measure's table (if not embedded in colorMeasure) |