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

DAYSAFTERMIN(A)

  • Dark
    Light
  • PDF

Article summary

Date Transform: DAYSAFTERMIN(A)

Returns the difference in days between A and Min(A)

Purpose

Use this function to calculate:
  • The number of days that have elapsed between an event and the earliest occurrence of that event
  • The age of a transaction, in days, since the earliest transaction in the dataset

Return Value

PropertyValue
FieldTypeInteger
FieldSizeMed
DataTypeDiscrete
DataSizeShort


Example Return Value: 0....N   
where 
N is the maximum number of days since the earliest date in the dataset

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.
DateTimeFunction“p1”: “DAYSAFTERMIN(A)”DAYSAFTERMIN(A)
A“p2”: “DateFieldName”Required. The date field from which to take the minimum value and the comparator values.
Supports:  
  • DataType: Discrete
  • Field Type: Date
  • Fixed Value:  #YYYY-MM-DD,    e.g. #2021-04-05

JSON Sample

Usage Notes

See also DAYSBEFOREMAX(A)

Example


ExampleDetails
DescriptionCalculate the number of days a transaction occurred after the first transaction
Input
  • Table: = [transactions]
  • Function: = DateTransform
  • DateTimeFunction: = DAYSAFTERMIN(A)
  • A:= [transactions].[first_transaction]
  • Name: = DaysAfterMin
Sample

Was this article helpful?