--- title: "AggregationFunction Element (ASSL) | Microsoft Docs" ms.custom: "" ms.date: "03/06/2017" ms.prod: "sql-server-2016" ms.reviewer: "" ms.suite: "" ms.technology: - "analysis-services" - "docset-sql-devref" ms.tgt_pltfrm: "" ms.topic: "reference" apiname: - "AggregationFunction Element" apilocation: - "http://schemas.microsoft.com/analysisservices/2003/engine" apitype: "Schema" applies_to: - "SQL Server 2016 Preview" f1_keywords: - "AggregationFunction" helpviewer_keywords: - "AggregationFunction element" ms.assetid: 40cfc7f9-1089-45f9-be90-a29770ed9682 caps.latest.revision: 39 author: "Minewiskan" ms.author: "owend" manager: "erikre" --- # AggregationFunction Element (ASSL) Contains the aggregation function to use for the account type. ## Syntax ```xml ... ... ... ``` ## Element Characteristics |Characteristic|Description| |--------------------|-----------------| |Data type and length|String (enumeration)| |Default value|*Sum*| |Cardinality|0-1: Optional element that can occur once and only once.| ## Element Relationships |Relationship|Element| |------------------|-------------| |Parent elements|[Account](../../../analysis-services/scripting/objects/account-element-assl.md)| |Child elements|None| ## Remarks The value of this element is limited to one of the following strings: |Value|Description| |-----------|-----------------| |*Sum*|The measure is aggregated using the **Sum** function.| |*Count*|The measure is aggregated using the **Count** function.| |*Min*|The measure is aggregated using the **Min** function.| |*Max*|The measure is aggregated using the **Max** function.| |*DistinctCount*|The measure is aggregated using the **DistinctCount** function.| |*None*|The measure is not aggregated.| |*AverageOfChildren*|The measure is aggregated by returning the average of its children.| |*FirstChild*|The measure is aggregated by returning its first child member.| |*LastChild*|The measure is aggregated by returning its last child member.| |*FirstNonEmpty*|The measure is aggregated by returning its first nonempty member.| |*LastNonEmpty*|The measure is aggregated by returning its last nonempty member.| The enumeration that corresponds to the allowed values for **AggregationFunction** in the Analysis Management Objects (AMO) object model is . ## See Also [Accounts Element (ASSL)](../../../analysis-services/scripting/collections/accounts-element-assl.md) [Properties (ASSL)](../../../analysis-services/scripting/properties/properties-assl.md)