# Sum

This Function returns a *\<numeric>*, which is the the result of the sum of all the values of the specified **Column** of a **Table**.

Function available for the following operating systems:

![](https://3821468174-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LrTlA1suFa5N48x_83N%2F-MAlPVpH3WRwBy16c7JY%2F-MAlQBZuuTnc6hyzKSVQ%2Fimage.png?alt=media\&token=5c9534b7-ca05-4ac4-b408-2207cd5a5295)

### Parameters

* **Table** *\<control> -* Source Table control.
* **Column** *\<numeric> -* Index of the column of the Table to sum the values from.

### **Examples**

* *Example 1*

Assuming that Table "Products" has a Column called "Stock" with index "3", with 3 records. Lets assume that the values for each record on that column are respectively: 200, 150 and 45.\
\
Sum(CTRL(Products), 3)\
**Result** = 395

* *Example 2*

Assuming that Table "Products" has a Column called "Stock" with index "3", with 3 records. Lets assume that the values for each record on that column are respectively: "200", "150" and "EMPTY".\
\
Sum(CTRL(Products), 3)\
**Result** = 350

{% hint style="info" %}
Regardless of the type pf the value in **Column**, it's always treated as a numeric. Therefore, if you try to execute this function over a **Column** filled with strings, each value will be converted to numeric before being added up to the result.
{% endhint %}
