Human Readable Row Level Dynamic Bins

Version 2

    Description:


    By modifying Joe Mako continuous bin formula, and with some big help from Simon Runc, this workbook demonstrates how to create a Human Readable Row Level Dynamic Bin.


    STR(

        IF (

            (ROUND([Sales] / [Bucket Size]) * [Bucket Size]))

            < [Sales]

            THEN ((ROUND([Sales] / [Bucket Size]) * [Bucket Size]) + 1)

            ELSE ((ROUND([Sales] / [Bucket Size]) * [Bucket Size]) - [Bucket Size] + 1)

            END

            )

    + ' to ' +

    STR(

        IF (

            (ROUND([Sales] / [Bucket Size]) * [Bucket Size]))

            < [Sales]

            THEN (ROUND([Sales] / [Bucket Size]) * [Bucket Size]) + [Bucket Size]

            ELSE (ROUND([Sales] / [Bucket Size]) * [Bucket Size])

            END

            )


    Since the calculation used in the workbook is a dimension, it can be used easily in other calculated fields, specifically LoDs.


    Any suggestions on how to improve this calc/workbook is much appreciated!


    Screenshot:


    Bucket Size 1.PNG

     

    Bucket Size 2.PNG


    Tableau Version:

    9.0


    Original Author:

    Rody Zakovich