[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-26 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eAVG\u003c/code\u003e function calculates the numerical average of all values within an array.\u003c/p\u003e\n"],["\u003cp\u003eIt returns a \u003ccode\u003eDouble\u003c/code\u003e value representing the average.\u003c/p\u003e\n"],["\u003cp\u003eThe function supports both \u003ccode\u003eDouble\u003c/code\u003e and \u003ccode\u003eInteger\u003c/code\u003e arrays as input.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAVG()\u003c/code\u003e function is called on a variable containing an array, such as \u003ccode\u003e$var1$.AVG()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ca href=\"/integration-connectors/docs/connector-reference-overview\"\u003esupported connectors\u003c/a\u003e for Application Integration are available to see.\u003c/p\u003e\n"]]],[],null,["# AVG function\n\nSee the [supported connectors](/integration-connectors/docs/connector-reference-overview) for Application Integration.\n\nAVG function\n============\n\n`AVG` function\n--------------\n\nSupported data type\n-------------------\n\n\nThe `AVG` function supports the following data types:\n\n- Double array\n- Integer array\n\nExample 1: Calculate the average of all the values in an integer array\n----------------------------------------------------------------------\n\n\n**Sample data** : `$var1$ = {2,4,9,3}`\n\n\n**Usage** : `$var1$.AVG()`\nCalculate the average of values in var1.\n\n\n**Output** : `4.5`\n\nExample 2: Calculate the average of all the values in a double array\n--------------------------------------------------------------------\n\n\n**Sample data** : `$var1$ = {2.0,6.1,3.9}`\n\n\n**Usage** : `$var1$.AVG()`\nCalculate the average of values in var1.\n\n\n**Output** : `4.0`\n\nRecommendation\n--------------\n\n- Learn how to add and configure a [Data Mapping task](/application-integration/docs/configure-data-mapping-task)"]]