A (DMATH)
  • 1 Minute to read
  • Dark
    Light
  • PDF

A (DMATH)

  • Dark
    Light
  • PDF

Article summary

DMath: A

Creates a  decimal copy of Field A

Purpose

Use this function to:
  • Turn an integer field into a decimal
  • Create a copy of an existing numeric field
  • Create a filtered copy of an existing field
  • Create a copy of an existing field where null values are mapped to zero

Return Value

PropertyValue
FieldTypeDouble
FieldSizeMed - Up to 65,630 unique values
High  - up to 1,000,000 unique values
Continuous - greater than 1,000,000 unique values
DataTypeDiscrete / Continuous
DataSizeShort / Integer /  Double
Example Return Value: X*.XXXXXX....-X*.XXXXX

e.g.  21.000000, 98754654.123456, -5.000000, -654.320000

Parameters

ParameterJSONDescription
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.
Note: Records not in the filter will still be treated as null, even if [Treat Null as Zero] is true.
Math Function“p1”: “”
A“p2”: “NumericFieldName”
“p2”: “#N*.N*”
Required. 
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


Usage Notes

See Also:   

Example

ExampleDetails
DescriptionCreate total spend for females, where null is mapped to 0
Input
  • Table: = [customer]
  • Filter:= [Gender=f]
  • Function: = DateTransform
  • Math Function = A
  • A:= [customer ].[total_spend]
  • Treat Null as Zero: = true
  • Name: = Total_Spend_Female
Sample





Was this article helpful?