Analysis Report Date Session Variables

You can use the Oracle Business Intelligence function or session variables installed by Reporting and Analytics as described in the following tables when configuring formulas and columns for dates in Analysis Reports.

All examples assume that:
  • The Point-of-Sale application at the store runs End-of-Day (EOD) operations every day, even when the store remains closed.

  • The starting day of the week for the 4-4-4 financial year is Thursday.

Today and Yesterday

The Today and Yesterday variables do not work based off of the current calendar date, as described in the following table:

Table 2-2 Today and Yesterday

Session Variable Name Description Examples

To-day

The most recent day that a guest check was entered into the system.

If a store opens Monday, December 27 and you run a report for Today:
  • Before entering a guest check, the report runs for Sunday, December 26. In this situation, the system continues to recognize Sunday as To-day because that remains the most recent day that a guest check was entered into the system.

  • After entering a guest check, the report runs for Monday, December 27. In this situation, the system recognizes that the new guest check was entered on Monday, December 27, and therefore recognizes Monday as the latest day that a guest check was entered into the system.

Yesterday

The most recent closed (full) business day.

If a store opens Monday, December 27, and you run a report for Yesterday, the report runs for Sunday, December 26.

If your store runs EOD operations at 7 PM and you run the report at 9 PM, the report runs for Monday, December 27, because the EOD operation has closed the Monday business day.

Days

You can use the following variables to perform calculations based on a specific day relative to the most recent closed business day, or Yesterday.

Table 2-3 Day Session Variables

Session Variable Name Description Examples

SameDayLastWeek

The day that is one financial week prior to Yesterday.

If a store opens Monday, May 28, and you run a report for SameDayLastWeek, the report runs for Sunday, May 20.

This image shows the current date and day that is one financial week prior to yesterday.

SameDayLastYear

The day that is one financial year prior to Yesterday.

The current day is Monday, May 28. When a report runs to calculate revenue for SameDayLastYear, the report calculates the revenue for Sunday, May 28 the previous year.

This image shows the day that is one financial week prior to yesterday.This image shows the current date.

SameDateLastYear

The same date as Yesterday in the previous financial year.

The current day is Monday, May 28. When a report runs to calculate revenue for SameDateLastYear, the report calculates the revenue for Saturday, December 27 the previous year.

This image shows the same date as yesterday in the previous financial year.This image shows the current date.

Weeks

You can use the following variables to perform calculations based on a specific week.

Table 2-4 Week Session Variables

Variable Name Description Examples

Past7Days

The seven most recent full (closed) business days.

If a store opens Monday, May 28, and you run a report for Past7Days, the report runs for Monday, May 21 to Sunday, May 27.

This image shows the current date and the seven most recent full (closed) business days.

CurrentFinancialWeek

The financial week that includes Yesterday.

If a store opens Monday, May 28, and you run a report for CurrentFinancialWeek, the report runs for Thursday, May 24 to Wednesday, May 30.

This image shows the current date and the financial week that includes yesterday.

LastWeekFinancial

The financial week that includes SameDayLastWeek.

If a store opens Monday, May 28, and you run a report for LastWeekFinancial, the system determines SameDayLastWeek is Sunday, May 20, and the report runs for Thursday, May 17 to Wednesday, May 23.

This image shows the current date and the financial week that includes the same day last week.

LastWeekWTDFinancial

The days in the previous financial week up to and including SameDayLastWeek.

If a store opens Monday, May 28, and you run a report for LastWeekWTDFinancial, the system determines SameDayLastWeek is Sunday, May 20, and the report runs for Thursday, May 17 to Sunday, May 20.

This image shows the current date and the days in the previous financial week up to and including the same day last week.

SameWTDLastYearFinancial

The days in the corresponding financial week in the previous financial year up to and including SameDayLastYear.

If a store opens Monday, May 28, and you run a report for SameWTDLastYearFinancial, the system determines SameDayLastYear is Sunday, May 28, and the report runs for Wednesday, May 24 to Sunday, May 28.

This image shows the days in the corresponding financial week in the previous financial year up to and including the same day last year.This image shows the current date.

Months

You can use the following variables to perform calculations based on a specific month.

Table 2-5 Month Session Variables

Variable Name Description Examples

CurrentMonth

The days in the current calendar month up to and including Yesterday.

If a store opens Monday, May 28, and you run a report for CurrentMonth, the report runs for Tuesday, May 1 to Sunday, May 27.

This image shows the current date and the days in the current calendar month up to and including yesterday.

LastMonthMTD

The days in the previous calendar month up to and including the same date as Yesterday.

If a store opens Monday, May 28, and you run a report for LastMonthMTD, the report runs for Tuesday, May 1 to Sunday, May 27.

This image shows the current date and the days in the previous calendar month up to and including the same date as yesterday.

SameMTDLastYear

The days in the same calendar month of the previous year, up to and including the same date as Yesterday.

If a store opens Monday, May 28, and you run a report for SameMTDLastYear, the report runs for Monday, May 1 to Saturday, May 27 for the previous year.

This image shows the days in the same calendar month of the previous year, up to and including the same date as yesterday.This image shows the current date.

Financial Periods

You can use the following variables to perform calculations based on a specific financial period.

Table 2-6 Financial Period Session Variables

Variable Name Description Examples

CurrentFinancialPeriod

The days in the current financial period up to and including Yesterday.

If a store opens Monday, May 28, and you run a report for CurrentFinancialPeriod, the report runs for Thursday, May 3 to Sunday, May 27.

This image shows the current date, and the days in the current financial period up to and including yesterday.

LastPeriodPTDFinancial

The days in the previous financial period up to and including the day in the period that corresponds to Yesterday.

If a store opens Monday, May 28, and you run a report for LastPeriodPTDFinancial, the report runs for Thursday, April 5 to Sunday, April 29.

This image shows the current date and the days in the previous financial period up to and including the day in the period that corresponds to yesterday.

SamePTDLastYearFinancial

The days in the same financial period of the previous financial year, up to and including the same day as Yesterday.

If a store opens Monday, May 28, and you run a report for SamePTDLastYearFinancial, the report runs for Wednesday, May 3 to Saturday, May 27.

This image shows the days in the same financial period of the previous financial year, up to and including the same day as yesterday.This image shows the current date.

Financial Quarters

You can use the following variables to perform calculations based on a specific financial quarter.

Table 2-7 Financial Quarter Session Variables

Variable Name Description Examples

CurrentFinancialQuarter

The days in the current financial quarter up to and including Yesterday.

If a store opens Monday, May 28, and you run a report for CurrentFinancialQuarter, the report runs for Thursday, February 8 to Sunday, May 27.

This image shows the current date and the days in the current financial quarter up to and including yesterday.

LastQuarterQTDFinancial

The days in the previous financial quarter up to and including the day in the quarter that corresponds to Yesterday.

If a store opens Monday, May 28, and you run a report for CurrentFinancialQuarter, the report runs for Thursday, November 16 to Sunday, February 7.

This image shows the current date and the days in the previous financial quarter up to and including the day in the quarter that corresponds to yesterday.

SameQTDLastYearFinancial

The days in the same financial quarter of the previous financial year, up to and including the same day as Yesterday.

If a store opens Monday, May 28, and you run a report for SameQTDLastYearFinancial, the report runs for Thursday, February 8 to Saturday, May 27.

This image shows the days in the same financial period of the previous financial year, up to and including the same day as yesterday.This image shows the current date.

Years

You can use the following variables to perform calculations based on a specific year.

Table 2-8 Year Session Variables

Variable Name Description Examples

CurrentYear

The days in the current calendar year up to and including Yesterday.

If a store opens Monday, May 28, and you run a report for CurrentYear, the report runs for Monday, January 1 to Sunday, May 27.

LastYearYTD

The days in the previous calendar year, up to and including the respective day for Yesterday.

If a store opens Monday, May 28, and you run a report for LastYearYTD, the report runs for Sunday, January 1 to Saturday, May 27 for the previous calendar year.

CurrentFinancialYear

The days in the current financial year up to and including Yesterday.

If a store opens Monday, May 28, and you run a report for CurrentYear, the report runs for Thursday, June 1 to Sunday, May 27.

LastYearYTDFinancial

The days in the previous financial year, up to and including the respective day for Yesterday.

If a store opens Monday, May 28, and you run a report for LastYearYTD, the report runs for Wednesday, June 1 to Saturday, May 27 for the previous financial year.