Skip to main content
Version: 4.2.1

Group by and Aggregation Functions

In the dR View options, specifically in the right-bottom panel, you'll encounter the powerful 'Group by' feature.

This property allows you to aggregate and group your data based on specific columns within the dR View context. It's akin to the 'GROUP BY' clause in SQL, which helps you summarize and analyze data effectively.

Note: The 'Group by' property is disabled by default.

Notice how after enabling the 'Group by,' in the component panel on top, you'll find the 'Aggregated Functions' option available. Here, you can add the desired aggregate function.

To add an aggregate function, click on 'Add,' and a wizard will pop up to assist you in choosing the aggregation function and providing it with a new alias.

Note: For customized or advanced formulas, consider using virtual fields. We will cover them in another section of the documentation.

Here's an example of a SQL Query that utilizes the 'GROUP BY' clause:

SELECT DimCustomer.FirstName AS FirstName
,DimCustomer.BirthDate AS BirthDate
,DimCustomer.Gender AS Gender
,DimCustomer.LastName AS LastName
,DimCustomer.Title AS Title
,SUM(DIMCUSTOMER.TOTALCHILDREN) AS SumTotalChildren
FROM DimCustomer DimCustomer
GROUP BY DimCustomer.FirstName
,DimCustomer.BirthDate
,DimCustomer.Gender
,DimCustomer.LastName
,DimCustomer.Title

Feel free to explore the 'Group by' property to perform data aggregation and summarization