knowledgecenter-breadcrum

Knowledge Center

18 Mar, 2024

How to use aggregate in FetchXml

Posted on 18 Mar, 2024 by Shekhar Jain, Posted in Dynamics 365 Web Api Dynamics 365

Blogs

In this blog, we will learn how to use aggregate in FetchXml.

Available Aggregate

  • Count
  • CountColumn
  • Avg
  • Sum
  • Min 
  • Max

 

1. Count

It aggregates data based on specified conditions and returns a numerical value representing the count of records meeting those conditions.

Output:

2. CountColumn

This attribute helps group data based on the values in a chosen column.

Output:

3. Sum

The "sum" function is used to calculate the total sum of numerical values within a specified column or attribute.

Output:

4. Avg

The "avg" function calculates the average value of numerical data within a specified column or attribute.

Output:

5. Min

The "min" function retrieves the minimum value of numerical data within a specified column or attribute.

Output:

6. Max

The "max" function retrieves the maximum value of numerical data within a specified column or attribute.

Output:

 

Below are points to note that differ from a regular query.

  • Set the fetch element aggregate attribute to true.
  • Set the alias attribute for each attribute element.
  • Set the aggregate attribute for each attribute element 

Comment

This is a Required Field

Loading

Recent Updates

Blogs
16 Jul, 2024

How to use Solutions with Power Pages

What is Solution in power Pages? A solution is a container for components such as Website Configuration and Dataverse Components.…

READ MORE
Blogs
15 Jul, 2024

Create a Dataverse table with a SharePoint List

In today’s business world, Organization uses SharePoint lists for document management, and data storage. Let's assume a scenario where an organization…

READ MORE
Case Study BW - Nebulaa IT Solutions
Case Study
03 Jul, 2024

Revolutionizing Build Warranty's Operations with a Scalable and Automated Dynamics 365 Solution

Customer Overview Build Warranty (BW), a leading UK-based provider of warranty solutions for the construction industry, sought a strategic partner…

READ MORE