This article provides an overview of the aggregation functionality in Microsoft Dynamics CRM, which we have integrated into our DocumentsCorePack Template Designer.
This feature proves to be highly valuable when you need to generate a comprehensive summary of specific data and perform calculations such as summing revenues or sales, calculating averages, and creating reports for different time periods (quarterly, yearly, monthly, or daily). Here is an example that demonstrates the proper usage of aggregation.
Aggregation fetches enable you to calculate sums, average minimum & maximum, and count items. All aggregation methods supported by Microsoft Dynamics CRM can be easily applied to any template, although the selection of aggregation functionalities depends on the field selected.
The aggregation fetches allow you to perform various calculations, including sum, average, minimum, maximum, and count, on specific items. All these aggregation methods supported by Microsoft Dynamics CRM can be easily applied to any template. The selection of aggregation functionalities depends on the chosen field.
- AVG: Average functionality is used for aggregating numerical values. It calculates the average (mean) of a specific field or attribute across multiple records or entities. With this functionality you can gain insights into your data’s average performance, behavior, or results, allowing you to make data-driven decisions and track essential metrics for your business.
Please note: 0 is not considered when the average is calculated. However, the result of a calculation including 0 is replaced by zero (0).
- COUNT (Sub-functionalities: COUNTCOLUMN, COUNT DISTINCT COLUMNS): The function allows you to calculate the total number of records or entities that meet specific criteria. The Count functionality is used to perform counting operations within CRM data.
- MAX: Is used to find the maximum (largest) value of a specific field or attribute within a set of records. For example, you can use MAX to identify the highest sales amount, the latest date, or the maximum quantity in each dataset.
Please note: 0 is not considered when the maximum value is calculated. However, the result of a calculation including 0 is replaced by zero (0).
- MIN: It is a function that helps you find the minimum (smallest) value of a field or attribute within a set of records. You can use MIN to determine the lowest sales amount, the earliest date, or the minimum quantity in a dataset.
- SUM: This is a function used to calculate the total sum of a numerical field or attribute across a set of records. It adds up the values within the specified field to provide a cumulative total. For instance, you can use SUM to calculate the total revenue, the total quantity sold, or the sum of expenses.
- MULTIPLE AGGREGATES: Multiple Aggregates refer to performing multiple aggregations on a dataset simultaneously. It involves calculating multiple summary statistics, such as sum, count, average, min, or max, across different fields or attributes simultaneously. This allows you to obtain various insights and analyze different aspects of your data in a single operation.
- GROUP BY: This is a clause used to group records based on one or more specific fields or attributes. It divides the data into subsets or categories based on the specified criteria. When combined with aggregate functions like SUM or COUNT, it allows you to calculate summary statistics within each group separately. For example, you can group sales data by region to determine the total sales amount per region.
- GROUP BY WITH LINKED ENTITY: This sub-functionality enables you to use the sum aggregate attribute to sum linked entity values.
- GROUP BY YEAR, QUARTER, MONTH, WEEK, or DAY: These sub-functionalities enable you to group results by year, quarter, month, week, or day.
- MULTIPLE GROUP BY: This functionality enables you to use multiple groups by clauses.
- ORDER BY: This is a clause used to sort the records in a specific order based on one or more fields or attributes. It arranges the data in ascending or descending order. ORDER BY is often used in conjunction with aggregate functions to sort the aggregated results based on a specific criterion. For instance, you can order a list of customers by their total purchase amount in descending order.
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.