Ravindra BagaleCourses & study guides

12. Data Hierarchies and Groups

12.7 Groups vs Calculated Columns vs Hierarchies

Group (list/bin) Calculated column / Power Query column Hierarchy
Purpose Combine values into categories Any row-level logic Drill from general to detailed
Created with Right-click › New group (no code) DAX SWITCH / M conditional column Right-click › Create hierarchy
Flexibility Simple membership or equal-width ranges Unlimited (conditions, other columns, other tables) Only orders existing columns
Maintenance Easy for business users; dialog-based Needs formula edits (or a mapping table) Easy
Example Region (West, Vidarbha …); Delivery time bins of 5 Delivery Speed Band with custom limits 0–10, 11–15, 16–30, 30+ State › City › Area › Store
Use in hierarchy? Yes (a group can be a level, e.g. Region › City) Yes –

Combine them

Mhanje asa: create the Region group, then build a hierarchy Region › City › Area › Store Name. Now a map or matrix can drill from West to Pune to Kothrud.

Practice task

Implement Region twice, once as a group and once as a DAX calculated column with SWITCH. Compare the results and write two lines on which one you would hand over to a business user.

Ravindra Bagale's Tip

Friends, many students use groups for logic that changes every month, and then edit the group by hand each time. Use a group for quick, stable buckets. Use a Power Query mapping table or a calculated column when the rules are complex, need documenting or must be reused in other reports. Don't worry – after doing it two or three times, it becomes a habit.

Thodkyaat sangaycha tar (quick recap)

Hierarchy mhanje drill path, group mhanje buckets. Sagle levels ekach table madhe hava, Other group visru naka, aani bins banvnyaadhi outliers (बाकीपेक्षा खूप वेगळे, असामान्य मूल्य) saaf kara. Aata pudhe jaauya – DAX, mhanje Power BI cha "brain"!