SHOWBETWEENPERIOD
Displays the data between the time frame specified. Can be used to display months, quarters, and year periods.
NAME | DESCRIPTION |
---|---|
Shows the months between the specified periods | |
Shows the quarters between the specified periods | |
Shows the years between the specified periods | |
Returns data for last n days | |
Returns data for last n months | |
Returns data for last n quarters | |
Returns data for last n years |
1. SHOWBETWEENPERIOD(MONTHPERIOD)
The SHOWBETWEENPERIOD(MONTHPERIOD) function can be used to display data for a particular month or a range of months.
Syntax
Arguments
year – The year for which data has to be fetched. Required.
from_month – The month for which data has to be fetched or the start month if a range is specified. Values can be between 1 and 12. Required.
to_month - The end month when a range of data has to be fetched. Values can be between 1 and 12. Optional.
Example
2. SHOWBETWEENPERIOD(QTRPERIOD)
The SHOWBETWEENPERIOD(QTRPERIOD) function can be used to display data for a particular quarter or a range of quarters.
Syntax
Arguments
year – The year for which data has to be fetched. Required.
from_qtr – The quarter for which data has to be fetched or the starting quarter if a range is specified. Values can be between 1 and 4. Required.
to_qtr - The end quarter when a range of data has to be fetched. Values can be between 1 and 4. Optional.
Example
3. SHOWBETWEENPERIOD(YEARPERIOD)
The SHOWBETWEENPERIOD(YEARPERIOD) function can be used to select data for a particular year or a range of years.
Syntax
Arguments
start_year – The year for which data has to be fetched or the starting year if a range is specified. Values should be in YYYY format. Required.
end_year- The end year when a range of data has to be fetched. Values should be in YYYY format. Optional.
Example
4. SHOWBETWEENPERIOD(LASTNDAY)
The SHOWBETWEENPERIOD(LASTNDAY) function can be used to display data for a specified number of days preceding the current day.
Syntax
Arguments
number_of_days – The number of days for which to fetch data. Required.
Example
5. SHOWBETWEENPERIOD(LASTNMONTH)
The SHOWBETWEENPERIOD(LASTNMONTH) function can be used to select data for a specified number of months preceding the current month.
Syntax
Arguments
number_of_months – The number of months for which to fetch data. Required.
Example
6. SHOWBETWEENPERIOD(LASTNYEAR)
The SHOWBETWEENPERIOD(LASTNYEAR) function can be used to select data for a specified number of years preceding the current year.
Syntax
Arguments
number_of_years – The number of years for which to fetch data. Required.
Example
7. SHOWBETWEENPERIOD(NEXTNDAY)
The SHOWBETWEENPERIOD(NEXTNDAY) function can be used to select data for a specified number of days after the current day.
Syntax
Arguments
number_of_days – The number of days for which to fetch data. Required.
Example
Last updated