Creating hierarchies for drilldown interaction
Hierarchies allow the model designer to specify navigation paths for the user. Usually, this is done in order to group members of a particular type together. A simple example of this is grouping months of a year together.
Getting ready
This recipe assumes a continuation from the recipe Sorting data.
How to do It…
Switch to the Diagram View of the model.
Change the
year_name
column toYear
.Select the
Month Name
andYear
columns by holding down the Ctrl key while selecting each column.Right-click the
Year
column and select the Create Hierarchy option, so that a new hierarchy is created within the view.Rename the hierarchy to
Month By Year
by right-clicking the hierarchy name and selecting Rename from the pop-up menu.Return to Excel and refresh the PowerPivot field list to show the new hierarchy in the dates table.
Remove the Months member from the existing Pivot and add the Month By Year hierarchy. Note that all years are shown (since these are the...