
Possible values for the period parameter are: MillisecondPeriod, SecondPeriod, MinutePeriod, HourPeriod, DayPeriod, WeekPeriod, MonthPeriod, QuarterPeriod, SemesterPeriod, YearPeriod. When adding or subtracting months (for SemesterPeriod, QuarterPeriod and MonthPeriod), if the day does not exist in the returned month, then the last day of the returned month must be used. If omitted, the period parameter works with days (DayPeriod). The num parameter can be negative to return a date earlier than start_date. The num parameter can be a constant, the numerical result of a function, a measure value or a numerical dimension value, and has to be an integer. These are pulled from the BI 4.2 documentation: Used to return a relative date based on adding/subtracting years Used to return a relative date based on adding/subtracting semesters Used to return a relative date based on adding/subtracting quarters Used to return a relative date based on adding/subtracting months Used to return a relative date based on adding/subtracting weeks Used to return a relative date based on adding/subtracting days Used to return a relative date based on adding/subtracting hours Used to return a relative date based on adding/subtracting minutes Used to return a relative date based on adding/subtracting seconds Used to return a relative date based on adding/subtracting milliseconds Below is a list of the ones that you can use: Value The documentation in BI 4.1 also omitted the values that were valid for this parameter. (Nov 11 2015) at the time of this writing. The above formula would return the current date minus 1 month.
=RelativeDate(CurrentDate()) 1 MonthPeriod) It is indeed a semicolon so be sure to use a semicolon for this to work: In some documentation, the separator between num and period was incorrectly shown as a comma. The proper syntax for this function is as follows:ĭate RelativeDate(start_date num period) This has been corrected in the BI 4.2 Formulas & Calculations guide:īut for those of you still on BI 4.1 SP6 and above, I have documented some useful information below that can get you started:
This was added to the product, but the documentation wasn’t updated with all, or in some case any, of the relevant details. Starting with BI 4.1 Support Pack 6, new functionality was added that allows you to do the same but with other date dimensions such as month, year, quarter, etc… Would return Today’s date minus 100 days. This was historically done by using a parameter that specified the number of days you wanted to add or subtract from a date. It’s core function is to return a date that is relative to another date. The RelativeDate function has been around a while.