--- title: "(A*B)+(C*D)+(E*F)" slug: "dmathfunction-13" updated: 2021-11-02T10:02:47Z published: 2021-11-02T10:02:48Z canonical: "docs.datajet.app/dmathfunction-13" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # (A*B)+(C*D)+(E*F) ## DMath: (A*B)+(C*D)+(E*F) ## Multiplies A by B, C by D, D by E and then adds the three products together ## Purpose Use this function to: - Add together the results of products AB, CD and DE ## Return Value | Property | Value | | --- | --- | | **FieldType** | Double | | **FieldSize** | Low / Med / High / Continuous | | **DataType** | Discrete / Continuous | | **DataSize** | Short / Integer / LongInteger / Double | ```shell Example Return Value: X*.XXXXXX....-X*.XXXXX e.g. 21.000000, 98754654.123456, -5.000000, -654.320000 ``` Record set displayThe result of DMATH(A+B+C+D) is a floating point field.   The recordset viewer only displays decimals where there is at least 1 non zero decimal digit.   Consider using LMATH(A+B+C+D) if no input fields have decimal precision. ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/DMATH_ABCDEF_Sample.PNG) ## Parameters | Parameter | JSON | Description | | --- | --- | --- | | **Table** | “targetTable”: “MyTableName” | The target table on which the new field will be created | | **Filter** | “dataset”: {DataSet_JSON} | Optional. If a filter is applied, records not in the filter recordset will be returned as null. | | **Math** **Function** | “p1”: “(A*B)+(C*D)+(E*F)” | (A*B)+(C*D)+(E*F) | | **A** | “p2”: “NumericFieldName” “p2”: “#N*.N*” | Required. Numeric Input for A *Supports:* - **DataType:** Discrete / Continuous - **Field Type:** Integer, Double - **Fixed Value:** #N* e.g. #201596, #-87 - **Fixed Value:** #N*.N* e.g. #201596.05, #-87.98 | | **B** | “p3”: “NumericFieldName” “p3”: “#N*.N*” | Required. Numeric Input for B *Supports:* - **DataType:** Discrete / Continuous - **Field Type:** Integer, Double - **Fixed Value:** #N* e.g. #201596, #-87 - **Fixed Value:** #N*.N* e.g. #201596.05, #-87.98 | | **C** | “p4”: “NumericFieldName” “p4”: “#N*.N*” | Required. Numeric Input for C *Supports:* - **DataType:** Discrete / Continuous - **Field Type:** Integer, Double - **Fixed Value:** #N* e.g. #201596, #-87 - **Fixed Value:** #N*.N* e.g. #201596.05, #-87.98 | | **D** | “p5”: “NumericFieldName” “p5”: “#N*.N*” | Required. Numeric Input for D *Supports:* - **DataType:** Discrete / Continuous - **Field Type:** Integer, Double - **Fixed Value:** #N* e.g. #201596, #-87 - **Fixed Value:** #N*.N* e.g. #201596.05, #-87.98 | | **E** | “p6”: “NumericFieldName” “p6”: “#N*.N*” | Required. Numeric Input for E *Supports:* - **DataType:** Discrete / Continuous - **Field Type:** Integer, Double - **Fixed Value:** #N* e.g. #201596, #-87 - **Fixed Value:** #N*.N* e.g. #201596.05, #-87.98 | | **F** | “p7”: “NumericFieldName” “p7”: “#N*.N*” | Required. Numeric Input for F *Supports:* - **DataType:** Discrete / Continuous - **Field Type:** Integer, Double - **Fixed Value:** #N* e.g. #201596, #-87 - **Fixed Value:** #N*.N* e.g. #201596.05, #-87.98 | | **Treat Null as Zero** | "nullIsZero": true "nullIsZero": false | True/False. Default = False If true, then any null values in the input fields will be treated as if they have a value of 0. | ## JSON Sample ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/DMATH_ABCDEF_JSON.PNG) ## Usage Notes See Also: - (A*B)+(C*D)+(E*F) (LMATH) - Mathematical Expression Field - [DMATH Overview](https://datajet.document360.io/docs/dmathfunction-1) ## Example | Example | Details | | --- | --- | | **Description** | Add products AB, CD and EF | | **Input** | - Table: = [customer] - Filter: = [No Filter] - Function: = DMath - **Math Function** **= (A*B)+(C*D)+(E*F)** - A:= [customer ].[Input_A] - B:= [customer ].[Input_B] - C:= [customer ].[Input_C] - D:= #100.23 - E:= [customer].[nTransactions] - F:= #12 - Name: = AtimesBplusCtimesDplusEtimesF | | **Sample** | ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/DMATH_ABCDEF_Example.PNG) |