LASTNDAY

Filters a range of data from the last 'n' days prior to the current date.

The LASTNDAY function can be used to select data from a given measure for a specified number of days preceding the current day. It should be used in conjunction with the SELECT statement and an aggregate function such as SUM or AVG.

Syntax

LASTNDAY(number_of_days)

Arguments

number_of_days – The number of preceding days for which data has to be fetched. Required.

Return value

Period Range.

Example

LASTNDAY(45) 
//Returns data from the last 45 days preceding the current one
LASTNDAY

Last updated

Was this helpful?