Type: Function
Function: NEXT_N_TIMEPERIOD
Syntax: NEXT_N_TIMEPERIOD(date, number, period)
Description: Returns true if the date is within the number of complete periods after the current one.
The period is "HOUR", "DAY", "WEEK", "MONTH", "QUARTER" or "YEAR", in upper or lower case.
The current period is not included: in May, the next 2 months are June and July.
It is the same condition as the Next filter of the insight designer (see Using filters). Use it in a custom formula, to count, group or label records on that condition, or as a filter in a query sent through the Keypup API or MCP server.
Sample usage:
NEXT_N_TIMEPERIOD(due_on, 2, "WEEK")returnstruefor the records due in the two weeks after this one.
