Insights How To Build a Histogram Or Buckets
How to create customer buckets (Histogram)
Business value: Create a widget to visualize distribution.
Example: We have opportunities with different revenue amounts and we would like to know how many opportunities are under $2;000; between $2000 and $5;000 etc. Let's say our chart will have 5 following buckets:
$1 - 1;000
$1;001 - 5;000
$5;001 - 10;000
$10;001 - 20;000
$20;001 +
The desired outcome is to see many opportunities we have in each bucket or instead of the chart on the left; you can create the chart on the right widget.
The same method could be applied for pie or bar charts.
- Start by adding the value field you would like to count. In this scenario; it is the Identification field from the Opportunities table.
The formula in the Value field is now COUNT(Identification).
- Go to edit mode and pick the Column Chart from the drop-down list.
- Leave Categories blank.
- Now; let's add a filtering field Revenue to the formula. Remember that the filtering field must always be located after the main value field and separated by a comma. In our case; we want to count the number of Opportunities and filter on revenue; so the syntax will be (COUNT([Identification]);[Revenue])
- Inside the formula; click on [Revenue] and choose Filter.
- Pick the range of the first bucket and click OK.
- Now duplicate the Value field four times (right Click followed by 'Duplicate') and name the buckets accordingly.
- Now there are 5 bars on the chart; but the data is only correct in the first one. Click on the pencil icon to modify the filter for the second bucket 2001-5000 as explained in steps 5 and 6.
- Follow the logic above and go through all buckets to adjust filtering values in the formulas.
All done. Now we we can see that the most of our Opportunities are between $10;000 and $20;000.