Rolling Periods

From DataSelf Knowledge Base
Jump to navigation Jump to search

Rolling Period Shift

By default, the ending date for periods with the key of "-1" is "Today" (the date on the computer clock when this table was last refreshed). But often, the data is being refreshed after midnight, in the early a.m. hours, and "Today" has not happened yet. Reports would be better based on "Yesterday" or another previous date.

The SYSTEM_Date.RollingPeriodShift formula allows the ending date of the periods with the key "-1" to be other than today. By default, it is "0". To shift it to "yesterday", change the formula to "1" (in the ETL formula wizard).

The formula could also be changed to reflect the LastWorkDate by making the RollingPeriodShift formula be the difference in days between the _ThisDateKey and the LastWorkDate.

(You might also want to change the LastWorkDate to always be less than Today.)