Continuous Bins

Version 3

    Description:

     

    It is often useful to bin numbers, and then plot on a continuous axis, or generally use as a continuous (green) pill. This enables adding a reference line.

     

    Tableau has a bin option built in, but only produces a discrete (blue) pill. One advantage of the built-in bin options is the Show Missing Values is enabled.

     

     

    Example Calculation:

     

    //if the number you want to bin is both positive and negative then use:

     

    INT( [Number] / [Bin Size] ) * [Bin Size] - IF [Number] < 0 THEN [Bin Size] ELSE 0 END

     

    //if the number you want to bin is only positive then use:

     

    INT( [Number] / [Bin Size] ) * [Bin Size]

     

    Number - The field that you would like to bin

    Bin Size - The size of each bin