ParallelPeriods
Returns member for a time period that derived from the specified date-time member.
- Returned Output: Member
- Library: PQL \ Semantic \ Date-Time
- Version: 2018.00.000
- Compatibility: Pyramid Query Language (PQL) data sources
Syntax
* Click on the function's arguments above for more details on the input values.
Comments
- The member needs to be an existing member from a date-time flagged attribute in the model.
- The 'periods' integer specifies how many periods to go backward (positive integer), or forward (negative integer) from the specified member.
- The optional 'period type' describes the type of time period by which to count backward or forward:
- 0 or YEARS (default)
- 1 or QUARTERS
- 2 or MONTHS
- 3 or WEEKS
- 4 or DAYS
- The optional 'period range' describes the range of members to return. If this is not included, the day will be returned.
- 0 or FULL_YEAR
- 1 or FULL_QUARTER
- 2 or FULL_MONTH
- 3 or FULL_WEEK
- For details on how to employ and use this function see the semantic calculation overview.
Different Function types
- This function is similar the MDX "ParallelPeriod" function.
Examples
Taking the date 2016-02-05, this formula will return the date for 2014-02-05:
ParallelPeriod( [data].[dateKey].[1454630400000], 2, 0 )
Taking the date 2016-02-05, this formula will return the full week of dates for 2018-02-05:
ParallelPeriod( [data].[dateKey].[1454630400000], -2, 0, 3 )
Taking the date 2016-02-05, this formula will return the full month of dates for 2016-04-05:
ParallelPeriod( [data].[dateKey].[1454630400000], -2, "MONTHS", "FULL_MONTH" )