Aggregate using XrmToolBox FetchXml Builder
Since the introduction of Dataverse, many utilities has been added to us developers' arsenal. One of them is the ability to use aggregate function with FetchXml. This eliminates the need to invoke LINQ operation or manual iteration in certain situations.
FetchXml now supports these following operations:
On top of those, Group By and Multiple Aggregation is also available (works on datetime field as well). This makes query using FetchXml becomes more versatile.
To ensure query performance, queries that return aggregate values are limited to 50000 records. Working with a sizable tables will need to be well designed.
Aggregate query in FetchXml Builder
FetchXml Builder is a very handy tool offered by XrmToolBox used by many developer to build fetchXml querry. Select aggregate option for the root level of the querry enables aggregate on entity's attribute.
Settings options on attribute level
Possible attribute aggregation