Skip to main content

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 RoleTypeDescription
AxisGroupingThe category axis (X axis for columns, Y axis for bars)
ValuesMeasureThe numeric values to display as bars
LegendGroupingSplits bars into series with distinct colors
Series ColorMeasure/GroupingHex color code (e.g. #FF0000) per legend value
LogoMeasure/GroupingBase64-encoded image per legend value
Error Bar UpperMeasureUpper bound for error bars (By Field mode)
Error Bar LowerMeasureLower bound for error bars (By Field mode)
Base (sample size)MeasureSample size used as n by the significance tests
Standard DeviationMeasureStandard deviation per series and per point. Switches the significance test from proportions to means
Add. TableMeasureExtra cells beside the marks — columns beside the bars, rows under or over the columns — see Add. Table
Significance referenceMeasureReference of an External reference significance test, as JSON — not drawn

Line Chart Data Roles​

Data RoleTypeDescription
AxisGroupingThe category axis (X axis)
ValuesMeasureThe numeric values (Y axis)
LegendGroupingSplits into multiple line series
Series ColorMeasure/GroupingHex color code per legend value
LogoMeasure/GroupingBase64-encoded image per legend value
Error Bar Upper/LowerMeasureBounds for error bars
Base (sample size)MeasureSample size per category, shown by the base row and used as n by the significance tests
Standard DeviationMeasureStandard deviation per series and per point. Switches the significance test from proportions to means
Significance referenceMeasureReference of an External reference significance test, as JSON — not drawn
Add. TableMeasureRows of values drawn above or under the chart, one cell per category — see Add. Table

Scatter Plot Data Roles​

Data RoleTypeDescription
Values (Labels)GroupingLabels for each data point
X AxisMeasureHorizontal position
Y AxisMeasureVertical position
LegendGroupingColor grouping
SizeMeasureBubble size encoding
TooltipsMeasureAdditional tooltip values
ColorMeasureData-driven point colors
LogoMeasure/GroupingBase64-encoded image per legend value

Gradient Heatmap Data Roles​

Data RoleTypeDescription
X AxisMeasure/GroupingHorizontal position of each sample point
Y AxisMeasure/GroupingVertical position of each sample point
ValueMeasure/GroupingThe measure shading the surface
Category (sample id)GroupingIdentifies each sample point and labels it
TooltipsMeasure/GroupingAdditional tooltip values

Radar Data Roles​

Data RoleTypeDescription
AxisGroupingOne spoke of the web per value; each axis carries its own scale
ValuesMeasureThe measure plotted along each axis
LegendGroupingSplits the web into one thread per series
Series ColorMeasure/GroupingHex color code, read per legend value or per axis
LogoMeasure/GroupingBase64 image, read per legend value and per axis
Base (sample size)MeasureSample size used as n by the significance tests
Standard DeviationMeasureFeeds the significance test on means (the test itself is chosen by Test On)
Significance referenceMeasureReference of an External reference significance test, as JSON — not drawn
TooltipsMeasureAdditional tooltip values

Pie Chart Data Roles​

Data RoleTypeDescription
CategoryGroupingOne slice per value
ValuesMeasureThe measure sliced by the pie
LegendGroupingOne chart per value — small multiples or concentric rings
Series ColorMeasure/GroupingHex color code, read per category or per legend value
LogoMeasure/GroupingBase64 image, read per category (legend) and per legend value (series titles)
Base (sample size)MeasureSample size used as n by the significance tests
Standard DeviationMeasureSwitches the significance test from shares to means
Significance referenceMeasureReference of an External reference significance test, as JSON — not drawn
TooltipsMeasureAdditional tooltip values

Series Color​

The Series Color data role allows you to control series 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"
)

The role is called Color on the scatter plot. The Gradient Heatmap has none — its colors come from the color scale instead. On the radar and the pie chart the role feeds one dimension at a time, chosen by the Apply colors to dropdown of the visual's main card.

Color Resolution Priority​

Colors are resolved in this order:

  1. Per-series conditional formatting (fx) from Power BI
  2. seriesColor data role value
  3. Host color palette
  4. Default 10-color array

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 (column, line, scatter, radar and pie)
  • End-of-line labels (line chart)
  • Inside bars (column chart)
  • At the outer end of each axis (radar)
  • In the title of each small multiple (pie chart)

The Gradient Heatmap has no Logo role.