Creating a hierarchy
As with multidimensional models, hierarchies can be helpful while defining the relationship between the fields in a table. The Tabular Model allows you to add hierarchies that can be used by client tools.
How to do it…
You will need to open the diagram view (MODEL | Model View | Diagram View) in order to work with hierarchies. In this recipe, we will be using the Date
table and creating a calendar and fiscal hierarchy, which are used pretty commonly, by performing the following steps:
In the diagram view, you need to click on the Create Hierarchy button on the
Date
table. This will add a hierarchy section to the bottom of the table. You will assign a name to the hierarchy here and then drag fields to add to the hierarchy.Our hierarchy will be fairly simple. Drag the columns down to the hierarchy. You need to drag the first column directly on to the hierarchy name.
Each column thereafter, you will drag and place in the preferred order of the hierarchy. I would recommend that...