Sorting and Grouping Data : Grouping data : Grouping data by intervals
 
Grouping data by intervals
When you create a group, BIRT’s default behavior is to group data by a single value, such as a customer name, an order ID, or a date. In the detailed orders report shown in Figure 9‑8, each customer name starts a new group, and each order ID starts a new group within the customer group.
Sometimes, it is more useful to group data by a specific interval. A sales report, for example, can present sales by quarters, rather than by dates. Similarly, you can group data in a shipping report by weeks or months, rather than by dates.
Compare the reports in Figure 9‑11 and Figure 9‑12. The report in Figure 9‑11 groups shipping information by dates.
Figure 9‑11 Dates grouped by single date values
The report in Figure 9‑12 groups the same shipping information by weeks.
Figure 9‑12 Dates grouped into weekly intervals
As the reports show, grouping by interval provides the following benefits:
*Organizes a long report into shorter, more readable pieces
*Summarizes data further for more effective analysis
The following sections describe in more detail how to group date-and-time, numeric, and string data by intervals.