12. Data Hierarchies and Groups
12.5 Data Groups (List Groups)
Start with a problem
Shraddha's category head wants Fresh versus Packaged, but the data has only Dairy, Snacks and Fruits.
Explain simply
A list group puts several values of a column into one bucket, without code. It creates a new field, Category (groups).
Show the data
| Category | Total Sales (₹) | Share |
|---|---|---|
| Dairy | 1,050 | 50.0% |
| Snacks | 650 | 31.0% |
| Fruits | 400 | 19.0% |
| Total | 2,100 | 100% |
About this data: This table uses columns: Category, Total Sales (₹), Share. This table uses columns: Category (groups), Total Sales (₹). This table uses columns: City, Sales (₹). This table uses columns: Region, Sales (₹). 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 (source: src/practice/).
Demonstrate
- Data pane › right-click Orders[Category] › New group.
-
Ctrl-click Dairy and Fruits › Group › rename the group
Fresh.Your result should look like this:
Groups and members Fresh: Dairy, Fruits -
Select Snacks › Group › rename
Packaged. Leave Include Other group ticked for future categories.Your result should look like this:
Groups and members Fresh: Dairy, Fruits · Packaged: Snacks -
OK › a new field Category (groups) appears.
- Bar chart: Category (groups) + Total Sales.
Show the result
Your result should look like this (fictional sample):
| Category (groups) | Total Sales (₹) |
|---|---|
| Fresh | 1,450 |
| Packaged | 650 |
| Total | 2,100 |
Explain what happened
Power BI created a calculated grouping column that maps each category to its bucket. Fresh = ₹1,050 + ₹400 = ₹1,450.
Explore further
- For many values or rules that change often, a mapping table is easier to maintain than a group.
Detailed reference for this lesson:
Groups in Power BI with example — in 30 seconds
What: A group puts several values of a column into one bucket.
Why: The state head wants a Region view (West, Vidarbha), but the data only has City.
Tiny example: Pune + Mumbai = West. Nagpur = Vidarbha.
Groups in Power BI with example — 30 सेकंदात
काय: Group एका column च्या अनेक values एका bucket मध्ये टाकतो.
का: State head ना Region view (West, Vidarbha) हवाय, पण data मध्ये फक्त City आहे.
छोटं उदाहरण: Pune + Mumbai = West. Nagpur = Vidarbha.
Groups in Power BI with example — 30 सेकंड में
क्या: Group एक column की कई values को एक bucket में डालता है.
क्यों: State head को Region view (West, Vidarbha) चाहिए, पर data में सिर्फ़ City है.
छोटा उदाहरण: Pune + Mumbai = West. Nagpur = Vidarbha.
First look at the data (before, then after):
Same before / after tables as text
Before — Sales by City
| City | Sales (₹) |
|---|---|
| Pune | 1,000 |
| Mumbai | 1,100 |
| Nagpur | 600 |
Formula / click path
Data pane › right-click City › New group
West = Pune, Mumbai · Vidarbha = Nagpur
After — Sales by City (groups)
| Region | Sales (₹) |
|---|---|
| West | 2,100 |
| Vidarbha | 600 |
Do it step by step:
- In the Data pane, right-click City › New group.
- Ctrl + click Pune and Mumbai. Click Group. Rename it
West. - Select Nagpur. Group it as
Vidarbha. - Click OK. Put City (groups) in a bar chart.
एक-एक step करून बघा:
- Data pane मध्ये City › New group वर right-click करा.
- Ctrl + click करून Pune आणि Mumbai निवडा. Group वर click करा. नाव
Westकरा. - Nagpur निवडा. त्याचा
Vidarbhagroup करा. - OK करा. City (groups) bar chart मध्ये टाका.
एक-एक step करके देखिए:
- Data pane में City › New group पर right-click कीजिए.
- Ctrl + click से Pune और Mumbai चुनिए. Group पर click कीजिए. नाम
Westरखिए. - Nagpur चुनिए. उसका
Vidarbhagroup बनाइए. - OK कीजिए. City (groups) को bar chart में डालिए.
A group combines several values of a column into a new category without writing DAX. Our trainer wants to show orders by Maharashtra region:
| Region (group) | Cities (members) |
|---|---|
| West | Pune, Mumbai |
| Vidarbha | Nagpur |
| North Maharashtra | Nashik |
| Marathwada | Sambhaji Nagar |
| South Maharashtra | Kolhapur |
(These labels are the grouping chosen for our practice reports.)
Steps in Power BI
- In the Data pane, right-click DarkStore › City › New group.
- The Groups dialog opens: Name
Region, Field City, Group type List. - In Ungrouped values, Ctrl + click Pune and Mumbai › click Group. A group appears on the right under Groups and members. Double-click its name and type
West. - Repeat: Nagpur →
Vidarbha; Nashik →North Maharashtra; Sambhaji Nagar →Marathwada; Kolhapur →South Maharashtra. - Tick Include Other group if you want every value that is not in a group (for example a future city) to fall into Other.
- OK. A new field Region with a group icon (paperclip-style) appears in DarkStore. Use it like a normal column in visuals, slicers and filters.
- Shortcut from a visual: in a bar chart of Orders by City, Ctrl + click the Pune and Mumbai bars › right-click › Group data. Power BI creates the group, and you can then rename it.
Edit or remove a group: right-click the Region field › Edit groups (add/remove members, rename, Ungroup). Delete the field to remove the grouping entirely.
Try this example yourself with Maharashtra's regions – West, Vidarbha, North Maharashtra, Marathwada and South Maharashtra.
Maharashtra चे regions वापरून हे उदाहरण स्वतः करा – West, Vidarbha, North Maharashtra, Marathwada आणि South Maharashtra.
Maharashtra के regions लेकर यह उदाहरण ख़ुद कीजिए – West, Vidarbha, North Maharashtra, Marathwada और South Maharashtra.
Ravindra Bagale's Tip
Remember one thing: forgetting Include Other group is the mistake I see most. New cities then show as their own names instead of a region, which confuses totals. Also clean spelling variants before grouping (Pune/pune). If the logic is long or changes often, use a mapping table in Power Query instead of a group. Keep this in mind!
Ravindra Bagale's Tip – मराठी
एक गोष्ट लक्षात ठेवा: Include Other group विसरणं ही मला सगळ्यात जास्त दिसणारी चूक आहे. मग नवीन cities region ऐवजी स्वतःच्या नावाने दिसतात, आणि totals मध्ये गोंधळ होतो. Grouping करण्याआधी spelling variants पण साफ करा (Pune/pune). Logic मोठं असेल किंवा वारंवार बदलत असेल तर group ऐवजी Power Query मध्ये mapping table वापरा. लक्षात ठेवा!
Ravindra Bagale's Tip – हिंदी
एक बात याद रखो: Include Other group भूल जाना सबसे ज़्यादा दिखने वाली गलती है. फिर नई cities region की जगह अपने नाम से दिखती हैं, और totals में गड़बड़ होती है. Grouping से पहले spelling variants भी साफ़ करो (Pune/pune). Logic लंबा हो या बार-बार बदलता हो तो group की जगह Power Query में mapping table इस्तेमाल करो. ध्यान रखना!
Fix common mistakes
| Wrong result | Reason | Correction |
|---|---|---|
| A new category Bakery shows as Other | Group membership is fixed | Edit the group |
| Fruits missing from Fresh after a rename to Fruit | Membership matches exact values | Add the renamed value to the group |
| Users cannot see which value is in which group | Rules hidden in a dialog | Document them, or use a mapping table |
Practise independently
Practice task
Group Pune and Nashik as Big cities and Kolhapur as Other. What are the totals?
Hints
- City totals: Pune ₹850, Nashik ₹800, Kolhapur ₹450.
Solution
Big cities ₹1,650; Other ₹450.
Think like a professional
Groups are perfect for quick, stable buckets. When the business keeps changing the rules, move them to a mapping table they can edit.
Loading DAX practice tasks...
- Region of each plant (Easy): Calculated column on Plants: Region = "Asia" when Country is "India", else "Europe".
- Shift code (Easy): Calculated column on Batches: Shift Code = "D" for the Day shift, else "N".
- Plant country on each batch (Easy): Calculated column on Batches: Country = the Country of the plant.
- Part family (Medium): Calculated column on Batches: Family = "Brakes" for Brake Disc, "Transmission" for Clutch Plate and Gear Shaft, else "Engine".
- Home or away (Medium): Calculated column on Plants: Group = "Home" for India, "DACH" for Germany, else "Other".
- Transmission units (Medium): Measure: Transmission Units = [Units Made] for Part in Clutch Plate and Gear Shaft.
- European units per part (Medium): Shown per Part. Measure: Europe Units = [Units Made] for Country in Germany and France.
- German share per part (Hard): Shown per Part. Measure: Germany Share = units in Germany ÷ [Units Made].
- Everything except pistons (Hard): Shown per Plant. Measure: Non Piston Units = [Units Made] for every part except Piston.
- Rejects in German night shifts (Hard): Shown per Part. Measure: DE Night Rejects = SUM of UnitsRejected for Germany and the Night shift.
Revision card