DMath: A/B
Divides numeric input A by numeric input B
Purpose
Use this function to:
- Create ratios
- Calculate percentages
- Scale data
Return Value
| Property | Value | 
|---|---|
| FieldType | Double | 
| FieldSize | Low / Med / High / Continuous | 
| DataType | Discrete / Continuous | 
| DataSize | Short / Integer / LongInteger / Double | 
Example Return Value: X*.XXXXXX....-X*.XXXXX
e.g.  21.000000, 98754654.123456, -5.000000, -654.320000Dividing by zero or null
- Dividing by zero will produce a null
- Dividing by null will produce a null
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” | A/B | 
| A | “p2”: “NumericFieldName” “p2”: “#N*.N*” | Required.  The numerator. Supports: 
 | 
| B | “p3”: “NumericFieldName” “p3”: “#N*.N*” | Required.  The denominator. Supports: 
 | 
| 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
Usage Notes
See Also:
- LMATH A/B
- DMATH Overview
Example
| Example | Details | 
|---|---|
| Description | Calculate transaction frequency for the customer | 
| Input | 
 | 
| Sample |