RETAIL_X_OF_Y
Syntax

Description of the illustration retail_x_of_y_fn.gif
-
dtexpr is a datetime expression with one of the following types (or any value that can be implicitly converted to
DATE):DATE,TIMESTAMP,TIMESTAMP WITH TIME ZONE,TIMESTAMP WITH LOCAL TIME ZONE. -
All retail functions take an optional is_restated parameter that controls how years that require 53 weeks are handled.
The is_restated parameter is a text expression that must resolve to either ` RESTATED
orNOT RESTATED(case-insensitive). A retail year typically contains exactly 52 weeks, which is 364 days. Therefore, every 5 or 6 years an extra 53rd week is added. This is a non-restated calendar and is what is produced when the *is_restated* parameter isNOT RESTATED(the default). Some users prefer to have all years contain 52 weeks for comparison purposes. Such calendars are called restated calendars, and is what is produced when the *is_restated* parameter isRESTATED`. -
The index_by parameter is a text value that must resolve to either
POSITIONorDATE(case-insensitive, defaults toDATE). It is used to distinguish between absolute and position-based numbers for the following cases:-
CALENDAR_DAY_OF_WEEK -
FISCAL_DAY_OF_WEEK -
RETAIL_DAY_OF_WEEK -
FISCAL_MONTH_OF_YEAR -
RETAIL_MONTH_OF_YEAR
-