Returns a member that is a number of days prior to or after the specified date-time member.
- Returned Output: Member
- Library: PQL \ Semantic \ Date-Time
- Version: 2018.00.000
- Compatibility: Pyramid Query Language (PQL) data sources
* Click on the function's arguments above for more details on the input values.
- The member needs to be an existing member from a date-time flagged attribute in the model.
- Use a positive integer to count days forward from the given date, in order to return a member after the given date.
- Use negative integers to return a specified day prior to the given date.
- For details on how to employ and use this function see the semantic calculation overview.
Different Function types
- This function is similar to the MDX lag or lead function, but is more useful in that it is date-time aware.
- To use a simple AddDays date-time operation on a list of dates, use the Common library function.
This example adds 10 days to the date 2016-02-05:
AddDays( [data].[dateKey]., 10 )
If the figure had been set to "-10" the result would have been 2016-01-26 instead.
The following example shows the same list formulation built in script mode: