Calculating parallel periods for multiple dates in a set

In the Calculating the year-over-year (YoY) growth (parallel periods) recipe, we have shown how the ParallelPeriod() function works and how it can be used to calculate the YoY growth. All we had to do is specify a member, ancestor's level, and an offset, and the parallel member was returned as a result.

Online Analytical Processing (OLAP) works in discrete space and therefore many functions, ParallelPeriod() included, expect a single member as their argument. On the other hand, relational reports are almost always designed using a date range, with Date1 and Date2 parameters for many relational reports. As the relational reporting has a longer tradition than the multidimensional, people are ...

Get MDX with Microsoft SQL Server 2016 Analysis Services Cookbook - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.