
When you add a binned dimension to the view, each binĪcts as an equal-sized container that summarizes data for a specific The number of distinct values (rows) in the data.Īfter you click OK to dismiss the Create Bins dialog box, a new binned field appears in the Dimensions area The difference between the field's minimum and maximum values. You can also consider these values if you want to set a bin size manually. The four read-only fields in the lower part of the Create Bins dialog box show you the data that Tableau uses to suggest a bin size. The size of each bin is determined by dividing the difference between the smallest and the largest values by the number of bins. In the formula, n is the number of distinct rows in the table. The formula that Tableau uses to calculate an optimal bin size is

In this case you can click Suggest Bin Size to have Tableau perform the optimizing calculation. If Tableau cannot perform the optimizing calculation quickly, the Size of bins field defaults to 10. If Tableau can perform the optimizing calculation quickly enough, the value you see initially in Size of bins is Tableau's estimate of the optimal bin size. On the web, the dialog box is named Edit Bins and has a slightly different appearance, but the options are the same.Įither enter a value in the Size of bins field or have Tableau calculate a value for you.

In the Create Bins dialog box, accept the proposed New field name or specify a different name for the new field. In the Data pane, right-click (control-click on Mac) a measure and select Create > Bins. See Create a Histogram from a Binned Dimension. This can be useful, for example, if you want to create a histogram. However, once the dimension is created, you can convert it to a continuous dimension. You are creating a field with a limited and discrete set of possible values out of a field with an unlimited, continuous range of When you create bins from a measure you create a new dimension. By dragging this calculation to the dimensions pane, you can use these bins with cube data sources and calculated fields. For example: (FLOOR(/1000)*1000) will create bins with a size of 1000. However, it is possible to create a calculated field that will replicate a bin of a specific size. Sources and binned fields cannot be used in calculations.

Note: You can bin data only for relational data But if you want to see values for Profit assigned to bins without reference to a dimension, you can create a numeric bin, with each individual bin corresponding to a range of values.

You could consider the State field as a set of bins-each profit value is sorted into a bin corresponding to the state from which the value was recorded. For example, suppose you create a view with Profit on Rows and State on Columns. Sometimes it's useful to convert a continuous measureĪny discrete field in Tableau can be considered as a set of bins.
