# Grouping

Develop powerful and lightweight web applications using ASP.NET MVC controls. Learn more about the ComponentOne MVC controls in ASP.NET MVC documentation.

## Content



You can use field formatting to group data. Suppose you have a bound list of products and you want to group all of the items ordered together within a particular quarter. You can use the **Field Settings** dialog box at run time or code. This example uses the sample created in the [Quick Start](/componentone/docs/mvc/online-mvc/workwithcontrols/Olap/QuickStartOlap) topic.

### To group data by year (quarter) at run time:

1.  Add the following fields to the grid view by selecting them in the PivotPanel: _Date, Product_, and _Downloads_.
2.  Right-click the **Date** field, under **Row Fields** and select **Field Settings**. The **Field Settings** dialog box appears.
3.  In the **Filter** option, make sure **Select All** option is selected.
4.  From the **Format** drop-down list, select **Year Quarter (yyyy "Q"q)** option to group the data in the **PivotGrid** according to quarter.
5.  Click **OK** again to close the **Field Settings** dialog box.

The following image displays data where products are grouped by the year (qaurter).

![](https://cdn.mescius.io/document-site-files/images/2b3ac322-100e-4637-958d-fb40dcda3f44/images/olapgrouping.png)