Create a Histogram with More Buckets

Domo's histogram card currently only allows a maximum of 20 buckets which may not be enough. How do i create a histogram with 1000 buckets?

Best Answer

  • Dont_Drop_the_DB
    Dont_Drop_the_DB Domo Employee
    Answer ✓

    One way to do this is with the Width_bucket function in a beast mode. This function allows you to create custom buckets for your histogram. 

    For example,

    WIDTH_BUCKET ( `mean`, 0, 60000, 4000 )


    WIDTH_BUCKET ( `mycolumn`, histogram_min, histogram_max,  Number_of_buckets )



    Try this

    1. Create a new card and choose the normal vertica bar chart
    2. Create a new Beastmode, let's call it "Bucket".
      1. WIDTH_BUCKET ( `mean`, 0, 60000, 4000 )
    3. On the Vertica bar chart
      1. X-axis
        1. =Bucket (this is the beast mode we just created)
      2. Y-axis
        1. Count of the mean
          1. This should be the count of the means
      3. Sorting
        1. =Bucket Ascending (No aggregation)


    This should give you a nice histogram with however many buckets you need.  See attached images for more context.