Two measures can both be numbers and still behave differently. A bill can come to $15.35, $15.36 or anything between. A table can seat 2 people or 3, but never 2.5. The first kind flows; the second comes in steps.

Continuous and discrete

  • Continuous numbers can take any value in a range: a price, a temperature, a weight, a time taken, a percentage. Between any two values there's always another one.
  • Discrete numbers come in whole steps, usually because they count something: people at a table, visits, goals, items in a basket. There's nothing between 2 and 3.

The question to ask is the same as the one for a value's meaning: could a value halfway between two others exist? If it could, the number is continuous. If it couldn't, it's discrete.

What it changes on a chart

A continuous number has to be grouped before it can be counted. Few values repeat exactly, so a chart of "how many rows have each value" would be one thin bar per value. A histogram cuts the range into equal bins (0 to 5, 5 to 10...) and counts the rows in each.

A discrete number with a few values is counted as it is. Each value is its own group: one bar for parties of 1, one for parties of 2. Bins that cut between them would only blur the steps, and a bin from 2.5 to 5 means nothing.

A line implies the values in between. A line joining two points says the measure passed through every value between them. That fits a temperature over a day. For a discrete count, steps or separate marks say it more honestly.

A discrete count with many values behaves as if it were continuous. Daily cases run into the thousands, so the steps are too small to see, and a line or a histogram works.

A worked example

Here are the points per game of 280 basketball players. Points per game is an average, so it can be 13.1 or 13.2: a continuous number. The histogram puts each player into a bin two and a half points wide and counts the players in each.

A histogram of the "NBA Player Season Stats" dataset: 280 values of Sum of PointsPerGame counted into bins from 2 to 31.4.
A histogram of the "NBA Player Season Stats" dataset: 280 values of Sum of PointsPerGame counted into bins from 2 to 31.4.

How to read this Histogram Try it in the explorer

Now take the 18,675 orders of a restaurant, and the size of the party behind each:

Party size Orders
1 6,238
2 5,193
3 4,260
4 2,173
5 667
6 124
7 17
8 3

Party size is discrete and has only eight values, so the chart for it is one bar per size, in order. The table above is already that chart's data. The same orders' tip percentage (19.3, 22.3...) has 331 different values, so it needs bins, like the points per game.

How the tool reads it

The engine looks at the values themselves. A run of whole numbers in a small range, like a party size of 1 to 8 or a rating of 1 to 5, is read as a set of ordered steps, and so is a run of years. A measure with many values, or with decimals, is read as continuous.

You can steer it in your own tool:

  • In Power BI, a number on the X axis can be set to Continuous or Categorical in the axis's Type setting. Categorical gives each value its own bar or tick; Continuous gives a scale with the values placed along it.
  • In Excel, a histogram chart has a Bin width setting. For a discrete count, set it to 1 so each value is its own bin.

Try it

Take two number fields from one of your tables: one you think is continuous, one you think is discrete. Ask whether a value halfway between two others could exist. Then count the different values in each. A discrete field with more than a few dozen values can be charted like a continuous one; one with a handful wants a bar per value.

The next lesson goes back to adding up: which measures can be totaled, which can be totaled only one way, and which can't be totaled at all.