The first module looked at the kind of value a field holds. This module asks a different question: what job does the field do in a chart? The same kind of value can do different jobs, and the job is what a chart cares about.

The five roles

  • Category. A label you group by: a team, a department, a complaint type. A chart turns a category's values into bars, slices, colors or panels.
  • Measure. A number you add up or average: revenue, cost, points per game. A chart turns a measure into a length, a position or a color strength. In Power BI, this is what goes in Values, and it usually arrives as a total, such as "Sum of Cost".
  • Date. A value that puts rows in order in time: a day, a month, a year. A chart can use it as a time axis and space the points by the real gaps between them.
  • Place. A value a map can find: a country, a state, a city, a pair of latitude and longitude.
  • Identifier. A value that names one row: an order number, a player ID, a ticket ID. It holds a different value on every row, or nearly so. It's for labels and tooltips, not for grouping.

A field plays one role at a time. Most tables have a few categories, one or more measures, and maybe a date, a place and an identifier.

How to tell them apart

Three questions sort most fields:

  1. Would adding it up mean something? Total cost, yes. Total complaint types, no. If adding means something, it's a measure.
  2. Does it repeat across rows? Neighborhood repeats: many complaints come from Downtown. A complaint ID doesn't. A field that repeats is usually a category; one that doesn't is usually an identifier.
  3. Is it about when or where? If it puts rows in time order, it's a date. If a map could place it, it's a place.

A worked example

Here are the first rows of a table of complaints made to a city's service line:

ComplaintID ComplaintType Neighborhood DaysToResolve Sum of Cost Priority ResolvedSameWeek
311-452754 Noise Southside 17 26.7 Medium False
311-996178 Water Main Downtown 2 85.1 Low True

Role by role:

  • ComplaintID is an identifier: nearly one per complaint (2,799 different IDs across 2,800 rows), never added up.
  • ComplaintType and Priority are categories. Priority has an order (Low, Medium, High, Urgent), which a chart should keep, but it's still a label.
  • Neighborhood is a category here. It names places, but a map can only find it with the city's neighborhood boundaries, which this table doesn't have.
  • DaysToResolve and Sum of Cost are measures.
  • ResolvedSameWeek is true or false, so it plays a category's role: it splits complaints into two groups.

There's no date field, so nothing in this table can be a time axis. With 2,800 complaints and 10 complaint types, it suits charts that compare categories, such as the spread of resolve times for each type, or a grid of complaint type against neighborhood.

A box plot of the "City 311 Service Complaints" dataset: the spread of Sum of Cost for each of 4 Priority groups.
A box plot of the "City 311 Service Complaints" dataset: the spread of Sum of Cost for each of 4 Priority groups.

How to read this Box plot Try it in the explorer

A heatmap of the "City 311 Service Complaints" dataset: a grid of Neighborhood by ComplaintType, each cell colored by its Sum of Cost.
A heatmap of the "City 311 Service Complaints" dataset: a grid of Neighborhood by ComplaintType, each cell colored by its Sum of Cost.

How to read this Heatmap Try it in the explorer

Try it

List the fields of a table you know and write a role beside each one. Then count: how many categories, how many measures, is there a date, is there a place? That short list already rules out many charts and points to a few.

The next lesson looks at the trickiest case: numbers that aren't measures at all.