The Period on Period functions use the lag function to return the given member and the member that is one position before the given member, in the same level. For instance, if a Quarter on Quarter calculation is selected, and the given date is Q2 2010, then both Q2 2010 and Q2 2009 are returned.
Period On Period functions generate the following elements:
- A parameter, which is used to inject a date into the query at runtime.
- Percentage difference custom calculations, which return a custom member when added to the query, showing the percentage difference between the two time periods.
- Custom lists, which return a list of dates when added to the query (the given date selected from the parameter, and the parallel period).
In this example, a Year on Year calculation was applied to the Year column from the Time Intelligence wizard:
The calculation produced a parameter, a percentage difference calculation, and a list. When the list (red highlight) is added to the query, the year parameter is also added automatically (red arrow); the year chip was then placed in the Rows drop zone. When 2010 is selected from the parameter, the query displays both 2010 and 2009:
The percentage difference calculation was then added, showing the percentage difference between the two years:
Here, a Month on Month calculation was applied to the Month hierarchy; the calculation produces a parameter, a percentage difference calculation, and a list. Adding the Month on Month list (red highlight) to the query also adds the month parameter (red arrow), from which the required date is injected into the query. A list is returned displaying the month selected, and the previous month: