# Binning & Regrouping Aggregates / Creating a "histogram"

**URL:** <https://community.omni.co/t/binning-regrouping-aggregates-creating-a-histogram/152>\
**Category:** Patterns\
**Created:** [September 16, 2024, 7:42pm UTC](https://community.omni.co/t/binning-regrouping-aggregates-creating-a-histogram/152 "2024-09-16T19:42:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![conner](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.omni.co/conner/32/11_2.png) [@conner](https://community.omni.co/u/conner)\
**Post date:** [September 16, 2024, 7:42pm UTC](https://community.omni.co/t/binning-regrouping-aggregates-creating-a-histogram/152/1 "2024-09-16T19:42:56Z")

</div>

A common workflow is taking a table, aggregating it, and then analyzing patterns in the aggregation. For example: take an orders table, aggregate it to count of orders per user, and then understand % of users per count of lifetime orders. Often, this results in a histogram-type chart that plots the number of values that fall into a given range.

 !["Histogram" chart in Omni](https://canada1.discourse-cdn.com/flex004/uploads/omni/original/1X/08e0c839c3d50f691932b73251c5adac106874f2.png)

In Omni, this binning & regrouping workflow is simple with our [Saved Views](https://docs.omni.co/docs/querying-and-sql/saved-views) feature:

1. Aggregate your table (i.e. aggregate `orders` to orders per user)
2. Save the query as a view
3. Navigate to all views & fields to find the table
4. Bin values using the [Bins UI](https://docs.omni.co/docs/querying-and-sql/custom-fields#binning-grouping-bucketing)
5. Select the binned field and the count field, and then visualize

Here’s a quick video showing how this works in practice:
