Discretizing data

Sometimes we require discretizing (or binning) of numeric data for pretty labeling or meeting some format guidelines; for example, you may need to report the sales amount in thousands, and thus you will need to create a field that will put every sales amount in various bins, for example, 0-1000, 1000-2000, and so on.

Getting ready

Let's use the sample file Sample – Coffee Chain (Access). Open a new worksheet and select Sample – Coffee Chain (Access) as the data source.

How to do it...

Once the data is loaded on the worksheet, perform the following steps to discretize a numeric value or create bins:

  1. Right-click on Sales from Measures and select the Create Bins option.
  2. Hit the Load button to see the distribution of the Sales amount. ...

Get Tableau: Creating Interactive Data Visualizations now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.