> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Math Functions

> This article details all math functions available in YiDA and their common use cases, including statistics, summation, average, and other frequently used calculations. Specific examples demonstrate how to apply these functions in real business scenarios to boost work efficiency.

This article lists all math functions in YiDA, along with their common use cases.

## Function Overview

| **Function name**                         | **Description**                                                                                                                |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| [COUNT](/yida/form/ygcgwobc4tewnmxr)      | Counts the total number of data records submitted for a specified form.                                                        |
| [ADD](/yida/form/chzvqqza7lig19gk)        | Calculates the sum of multiple field values.                                                                                   |
| [AVERAGE](/yida/form/cmntz03rxr7lvg8i)    | Returns the arithmetic mean of a set of Numerical values.                                                                      |
| [MAX](/yida/form/hrmegrov95qkft01)        | Returns the maximum value in a set of numbers.                                                                                 |
| [MIN](/yida/form/tzmz5prxfk1m6ooo)        | Returns the minimum value in a set of numbers.                                                                                 |
| [ABS](/yida/form/nqxuge2x337g5r7u)        | Returns the absolute value of a number when it is negative.                                                                    |
| [ROUND](/yida/form/gzx4fgcgya1g7dzv)      | Rounds a number to the specified number of decimal places.                                                                     |
| [CEILING](/yida/form/pfdukipqlw5rko8s)    | Rounds the parameter number up (away from zero) to the nearest multiple of the specified base.                                 |
| [FLOOR](/yida/form/gkzdswxg4g18443y)      | Rounds the parameter number down (toward zero) to the nearest multiple of significance.                                        |
| [INT](/yida/form/qht3on9d40988egd)        | Rounds a number down to the nearest integer.                                                                                   |
| [LOG](/yida/form/bunl3zq1z68guymc)        | Returns the logarithm of a number to the specified base.                                                                       |
| [MOD](/yida/form/smcm971lepq2nv6o)        | Returns the remainder from dividing two Numerical components.                                                                  |
| [POWER](/yida/form/biskll33337npp7d)      | Calculates the result of a Numerical component raised to a power.                                                              |
| [FIXED](/yida/form/an1t8blpsi4aue68)      | Rounds a number to the specified number of decimal places, formats it in decimal notation, and returns the result as a number. |
| [SQRT](/yida/form/ngysm1kw31gkmbqh)       | Returns the positive square root of a Numerical component value.                                                               |
| [SUM](/yida/form/ab2ef6nzxozn0xfe)        | Adds all numbers passed as parameters and returns their sum.                                                                   |
| [PRODUCT](/yida/form/wu3xhb5ve6v0tvci)    | Returns a result of the double-precision float type.                                                                           |
| [SUMPRODUCT](/yida/form/zrgy7twy6d9ry6ey) | Multiplies corresponding elements in the given arrays and returns the sum of those products.                                   |
| [LARGE](/yida/form/rnyume8c4kkywdpg)      | Returns the k-th largest value in a data set.                                                                                  |
| [SMALL](/yida/form/kruy97m10v8mt3mt)      | Returns the k-th smallest value in a data set.                                                                                 |

## Common Scenarios

### Calculate the Total Amount Across Multiple Line Items

* In a purchase reimbursement scenario, multiple categories are often reimbursed together. To calculate the total amount across all line items, follow these steps:

(1) Add a subform component to the form (configured with unit price, quantity, and amount), and Add a Numerical or Single-line text component outside the subform.

(2) In the amount component inside the subform, configure `Subform.Unit price * Subform.Quantity`. Then, in the Numerical or Single-line text component outside the subform, configure `SUM(Subform.Amount)`.

The result is shown in the animation below.
