You are viewing content for 5.1 | 5.0 | 4.9 | 4.8 | 4.7 | 4.6 | 4.5 | 4.4 | 4.3 | Previous Releases


lastVersion

Returns the last occurrence of a value with respect to a date.

Example

Sum the AMOUNT_SOLD by CUSTOMER_ID

Sum the last AMOUNT_SOLD value relative to TIME_ID grouped by CUSTOMER_ID.

sum(lastVersion(SALES.SALES.AMOUNT_SOLD, SALES.SALES.CUSTOMER_ID, SALES.SALES.TIME_ID))

Syntax

firstVersion(<type> value, <type> group_by, date order_by)
  • value : an Incorta type
  • group_by : an Incorta type
  • order_by : date

    Returns

    Type of value

Notes

Returns the last occurrence of a value with respect to date (i.e. the order-by parameter). Unless used as a filter, this function must be used inside an aggregation function.


© Incorta, Inc. All Rights Reserved.