Re-Process the Cube and Review the New Relative Time Capabilities within the Cube Browser
Let's perform a re-process of the cube to ensure we are in sync, before reviewing the new relative time structures in action.
1. From within the Cube Editor, select Tools --> Process Cube ... from the main menu, as shown in Illustration 64.
2. Click Yes when prompted to save the cube.
3. Click No when prompted to design aggregations, in the next message box that appears.
4. Select the radio button corresponding to the Full option on the Process a Cube dialog that appears next.
5. Click OK to begin processing the Warehouse cube.
Processing begins immediately, and the Process viewer appears, displaying various logged events. Processing completes, and the viewer presents the familiar green Processing completed successfully message.
6. Click Close to dismiss the viewer.
We will next review our new relative time dimension in action.
7. Click the Data tab within Analysis Manager.
The Cube Browser Data view appears.
8. Within the Data view, ensure that the Product dimension is in place as the row axis, by dragging it there to replace the existing dimension, as necessary.
9. Within the Data view, ensure that the Measures dimension is in place as the column axis, dragging it there to replace the existing dimension, if required.
The Data view, with the aforementioned dimensions in place within the respective axes, partially appears as depicted in Illustration 65.
Illustration 65: Data View, with Initial Axes in Place (Partial View) ...
We will drag a couple of additional dimensions into place, to emphasize the operation of the Relative Time dimension in juxtaposition to the regular Time dimension, where we can assess its effectiveness easily.
10. Drag the Time dimension to the right of the Product dimension, the current occupant of the row axis, until, with the cursor touching the right side of the Product axis, the icon shown in Illustration 66 appears.
Illustration 66: Drop Point to "Crossjoin" Product and Time Dimensions (Icon Enlarged)
11. Drop the Time dimension in place, to form a crossjoin with the Product dimension, as partially depicted in Illustration 67.
Illustration 67: Crossjoined Product and Time Dimensions (Partial View)
12. Drag the Relative Time dimension to just below the Measures dimension, the current occupant of the column axis, until, with the cursor touching the bottom side of the Measures axis, the icon shown in Illustration 68 appears.
Illustration 68: "Crossjoining" Measures and Relative Time Dimensions (Icon Enlarged)
13. Drop the Relative Time dimension in place, to form a crossjoin with the Measures dimension, as partially depicted in Illustration 69.
Illustration 69: Crossjoined Measures and Relative Time Dimensions (Partial View)
The resulting axes will allow us to perform a quick visual verification of the effectiveness of our new Relative Time capabilities. Let's drill into a sample and examine the results.
14. Double-click the Year column heading, to drill down for all rows.
15. Double-click the Quarter column heading, to achieve the same effect.
16. Scroll down in the Data view to the Food Product Family.
17. Scroll over in the Data view, so that the Store Invoice measures appear, with Current as the leftmost column appearing in the matrix.
The cube browser matrix, aligned with the intersects upon which we have chosen to focus, appears similar to that partially shown in Illustration 70.
Illustration 70: Relative Time Dimension Members in Action ...
We can see, within the small sample of data we have aligned in the browser, how the members of the Relative Time dimension accomplish the objectives for which they were created. For example, we can see that the Current value (really the simple Warehouse Sales value with no relative time calculation applied somewhat opposite to the "rollup" behavior we typically see in dimensions) is accumulating in our "to date" calculations just as we might expect. We can also see that the 1998 Prior Year Total, 73,367.55, agrees with the 1997 Current (as well as 1997 Year-to-Date) value. We can also easily verify that the Prior Quarter Totals and Prior Month Totals appear to be functioning as we might expect.
We will examine
the use of these new structures from within a reporting environment in a
subsequent article in my MSSQL Server
Reporting Services series
at Database Journal.
18. Select File --> Exit to close the Cube Editor.
19. File --> Exit again, to close Analysis Services.
In this article, we extended the examination of the design and creation, within Analysis services, of relative time periods that we began in Relative Time Periods in an Analysis Services Cube, Part I. As we noted in the introductions of both articles, a popular feature found in Cognos PowerPlay Transformer, among other popular enterprise BI applications, is a set of relative time periods, which can be generated automatically or manually for reporting in the Cognos PowerPlay application. After discussing, in Part I, the frequent request that I receive to provide options afforded within Analysis Services for replicating the popular relative time period capabilities, we began with a straightforward approach to meeting the requirement for relative time periods, highlighting differences in operation inherent in the use of a calculated member to achieve the capabilities offered in Cognos PowerPlay Transformer.
In this article, we developed a more sophisticated approach that closely replicates relative time period functionality in Cognos PowerPlay Transformer, and thereby provides a solution even more user friendly for reporting specialists and information consumers. After briefly revisiting the capabilities found in Cognos PowerPlay Transformer, we began an exploration of this approach, highlighting its advantages over the simple option we offered in our previous article, a calculated member to meet a narrower need. We then performed a practice exercise, whereby we added relative time capabilities with this more evolved method, creating the structural members in Analysis Manager that we require to implement the solution.
A significant part of our exercise involved preparation of the data source to support a special dimension, populated with calculated members that perform the relative time aggregations, which we in turn created in Analysis Services. As a concluding step in our practice session, we verified the adequacy of our solution by demonstrating the use of the new capabilities from the perspective of the Cube Browser in Analysis Manager, looking forward to a subsequent article where we employ our handiwork within Reporting Services to more closely replicate the way the functionality offered within Cognos PowerPlay Transformer can make the solution even more user friendly, in the Microsoft counterpart to Cognos PowerPlay, for reporting specialists and information consumers.
» See All Articles by Columnist William E. Pearson, III
Discuss this article in the MSSQL Server 2000 Analysis Services and MDX Topics Forum.