**Description**: here I share an idea of how to build a dynamic histogram in different selected measure ... by adding different measure and automatically calculate the suitable Pin size of this selected measure, and finally divide the the measure based on the calculated bin size ...

Note:

We use the same formula used by Tableau to calculate the bin size

you also can find the complete VIZ at the following Public link:

**Screenshot**:

1- We add the required measures to a parameter to allow user to select among them, and create calculated field to return the selected meassure** **

2- Calculate the number of bins and bin size based on the following formulas

3- We add a dimension that categorize the measure value into bins

4- finally you can switch between measure histogram as follow

**Tableau Version**:* **(example 10.4)*

* *

**Original Author**: Haitham Farouk

## Comments