Ravindra BagaleCourses & study guides

12. Data Hierarchies and Groups

12.2 Creating a Hierarchy in the Data Pane

Steps in Power BI – Location hierarchy

  1. In Report view or Table view, open the Data pane and expand DarkStore.
  2. Right-click State › Create hierarchy. A new item State Hierarchy appears with State as its first level.
  3. Right-click City › Add to hierarchy › State Hierarchy. Repeat for Area and Store Name in this order.
  4. Right-click State Hierarchy › Rename › Location.
  5. To reorder or remove levels, open Model view, select the hierarchy and use the Properties pane. The Hierarchy section lists the levels. Select or deselect columns, drag them into order, then click Apply level changes. You can also right-click a level in the Data pane › Remove from hierarchy.
  6. Optional: rename levels (right-click a level › Rename), e.g. Store Name → Store.

Repeat for Date: Year › Quarter › Month Name › Date (make sure Month Name is sorted by Month Number, Module 11.5), and for Product: Category › Sub Category › Product Name.

Ravindra Bagale's Tip

Mitrano, dhyan dya: putting levels in the wrong order (City above State) makes drill-down meaningless, and a hierarchy can't mix columns from different tables. Also watch out for duplicate names: two "Station Road" areas in different cities show as one bar when the City level is hidden. Use unique store names or keep City visible. Chuk karu naka!

Practice task

Create the Location, Date and Product hierarchies. Hide the separate Area column from report view (right-click › Hide in report view) and check that the hierarchy still works.