12. Data Hierarchies and Groups
12.4 Using Hierarchies in Visuals and Slicers
Start with a problem
Ravina wants a slicer where a manager can tick Pune, or open it and tick only Kothrud.
Explain simply
Put the hierarchy into a slicer for an expandable tree, or onto a visual's axis to drill down.
Show the data
| Region | City | Store |
|---|---|---|
| West Maharashtra | Pune | Kothrud |
| West Maharashtra | Pune | Baner |
| North Maharashtra | Nashik | Gangapur |
| North Maharashtra | Nashik | College Road |
| South Maharashtra | Kolhapur | Rajarampuri |
About this data: This table uses columns: Region, City, Store. This table uses columns: Visual, Action, Result. This table uses columns: Wrong result, Reason, Correction. Values shown are the lesson examples already on this page (not a new dataset).
Fictional sample data. Practice file: visuals_orders_apr_may_2026.csv, dark_stores_maharashtra.csv (source: src/practice/).
Demonstrate
-
Add a Slicer › drag Location (Region › City › Store) into Field.
Your result should look like this:
Slicer ▸ North Maharashtra ▸ South Maharashtra ▸ West Maharashtra -
Expand West Maharashtra › Pune › tick Kothrud only.
Your result should look like this:
Total Sales card ₹650 -
Tick Pune (the whole city).
Your result should look like this:
Total Sales card ₹850 -
Column chart: Location on X-axis › turn on Drill down mode (↓) › click West Maharashtra.
Your result should look like this:
Columns Pune ₹850 -
Back up › Expand all down one level (forked arrow).
Your result should look like this:
Columns North Maharashtra Nashik ₹800, South Maharashtra Kolhapur ₹450, West Maharashtra Pune ₹850
Show the result
Your result should look like this (fictional sample):
| Visual | Action | Result |
|---|---|---|
| Slicer | Kothrud ticked | ₹650 |
| Slicer | Pune ticked | ₹850 |
| Column chart | Drill into West Maharashtra | Pune ₹850 |
| Column chart | Expand all down one level | 3 region-city columns |
Explain what happened
Ticking a parent selects all its children; ticking a child selects only that store. Drill down filters to one branch; Expand all shows the next level for every branch.
Explore further
- The matrix uses +/- buttons for the same idea (Module 16.4).
Detailed reference for this lesson:
- Visuals: drag the whole hierarchy (e.g. Location) into X-axis/Y-axis or matrix Rows. The drill icons appear on the visual header (Module 16). You can untick levels you do not want in that visual (click the ✕ next to a level in the field well).
- Matrix: rows show +/- expand buttons for each level (Module 16.4).
- Slicers: drag the hierarchy (or several fields) into a slicer's Field well. You get a hierarchy slicer with expand arrows (Maharashtra › Pune › Kothrud …). Format it in Format visual › Visual › Slicer settings (e.g. Single select) and Hierarchy (expand/collapse icons).
Practice task
Build a matrix with Location on rows and Year › Month (Date hierarchy) on columns, showing Total Orders. Add a hierarchy slicer for Product (Category › Product Name).
Ravindra Bagale's Tip
Friends, many students put a hierarchy on a visual and then wonder why drill buttons don't appear or a slicer shows a flat list. Check that the whole hierarchy (not a single level) is in the field well, and use a hierarchy slicer style when users need to expand levels. Never forget this.
Ravindra Bagale's Tip – मराठी
मित्रांनो, बरेच students visual वर hierarchy टाकतात आणि मग drill buttons का दिसत नाहीत किंवा slicer flat list का दाखवतो याचा विचार करतात. Field well मध्ये पूर्ण hierarchy आहे (एकच level नाही) हे चेक करा, आणि users ना levels expand करायचे असतील तर hierarchy slicer style वापरा. हे अजिबात विसरू नका.
Ravindra Bagale's Tip – हिंदी
दोस्तों, बहुत से students visual पर hierarchy डालते हैं और फिर सोचते हैं कि drill buttons क्यों नहीं दिख रहे या slicer flat list क्यों दिखा रहा है. Check करो कि field well में पूरी hierarchy है (सिर्फ़ एक level नहीं), और users को levels expand करने हों तो hierarchy slicer style इस्तेमाल करो. यह बिल्कुल मत भूलना.
Fix common mistakes
| Wrong result | Reason | Correction |
|---|---|---|
| Clicking a column does nothing | Drill down mode (↓) not switched on | Turn on drill mode, then click |
| The slicer shows a flat list | Only one field in the slicer | Add the whole hierarchy |
| Pune ticked but Kothrud alone expected | A parent tick selects all children | Tick only the child |
Practise independently
Practice task
In the slicer, tick Gangapur and Rajarampuri. What does the Total Sales card show?
Hints
- Rajarampuri's second order was cancelled (₹0).
Solution
₹300 + ₹450 = ₹750.
Think like a professional
Hierarchy slicers save space, but test them with real users: some expect a parent tick to mean the parent only.
Revision card