Data Roles
Data roles define what data fields your visual accepts. Each visual has its own set of data roles.
Column Chart Data Roles
| Data Role | Type | Description |
|---|---|---|
| Axis | Grouping | The category axis (X axis for columns, Y axis for bars) |
| Values | Measure | The numeric values to display as bars |
| Legend | Grouping | Splits bars into series with distinct colors |
| Series Color | Measure/Grouping | Hex color code (e.g. #FF0000) per legend value |
| Logo | Measure/Grouping | Base64-encoded image per legend value |
| Error Bar Upper | Measure | Upper bound for error bars (By Field mode) |
| Error Bar Lower | Measure | Lower bound for error bars (By Field mode) |
Line Chart Data Roles
| Data Role | Type | Description |
|---|---|---|
| Axis | Grouping | The category axis (X axis) |
| Values | Measure | The numeric values (Y axis) |
| Legend | Grouping | Splits into multiple line series |
| Series Color | Measure/Grouping | Hex color code per legend value |
| Logo | Measure/Grouping | Base64-encoded image per legend value |
| Error Bar Upper/Lower | Measure | Bounds for error bars |
Scatter Plot Data Roles
| Data Role | Type | Description |
|---|---|---|
| Values (Labels) | Grouping | Labels for each data point |
| X Axis | Measure | Horizontal position |
| Y Axis | Measure | Vertical position |
| Legend | Grouping | Color grouping |
| Size | Measure | Bubble size encoding |
| Tooltips | Measure | Additional tooltip values |
| Color | Measure | Data-driven point colors |
| Logo | Measure/Grouping | Base64-encoded image per legend value |
Series Color
The Series Color data role allows you to control bar/line colors directly from your data model. Simply create a column or measure that returns a hex color code:
SeriesColor = SWITCH(
SELECTEDVALUE(Products[Category]),
"Electronics", "#4682B4",
"Clothing", "#FF6347",
"Food", "#32CD32",
"#888888"
)
Color Resolution Priority
Colors are resolved in this order:
- Per-series conditional formatting (fx) from Power BI
seriesColordata role value- Host color palette
- Default 10-color array
Logo
The Logo data role accepts base64-encoded images. If the value doesn't start with data:, the visual automatically prepends data:image/png;base64,.
Logos can appear in:
- The legend (all three visuals)
- End-of-line labels (line chart)
- Inside bars (column chart)