Group Rows in Power BI: Methods, Steps, and Limits

How-to basics · Updated November 22, 2026

To group rows in Power BI, use a Matrix visual when you want expandable row levels, or create a group from a column when you want to combine selected values into categories. A standard Table visual does not provide expandable row groups, so choosing the right method depends on whether you are organizing a report view or changing how categories are represented.

What grouping rows means in Power BI

People use “group rows” to describe two different tasks. One is arranging data into a hierarchy that report readers can expand and collapse, such as Region, then City, then Store. The other is combining several values into a broader category, such as mapping several product names to “Accessories.” Power BI handles these tasks with different features.

A Matrix visual is usually the right choice for a hierarchy. It displays fields at nested row levels and can show subtotals and expandable detail. A Power BI group, by contrast, creates a new field that represents selected values together. Neither option edits the original source data: groups are model metadata, while a matrix changes the way fields are displayed.

For example, suppose a sales report contains rows for several product models. A matrix can show Product Category above Product Model, allowing the reader to expand a category. A product group can instead combine selected models into a category such as “Legacy models” so that a chart or table reports them together.

Combine category values with a Power BI group

Create a group when several values in one column should be treated as a single reporting category. In Power BI Desktop, find the column in the Data or Fields pane, right-click it, and choose New group. The wording or pane name can vary slightly between Desktop versions, but the grouping dialog lets you select values and create a named group.

  1. Choose a categorical column, such as Product, Customer Segment, or Region. Groups are based on values from one column at a time.
  2. In the dialog, select the values to combine. Use Ctrl-click to select separate values when needed.
  3. Select Group, then give the new group a clear name, such as “Other accessories.” Repeat to create additional groups.
  4. If appropriate, include an Other group so values not assigned to a named group appear together.
  5. Select OK. Power BI adds a group field to the model. Add that field to a visual in place of, or alongside, the original column.

Imagine a Product column containing “USB cable,” “HDMI cable,” “Adapter,” and “Keyboard.” You could group the first three as “Cables and adapters” while leaving Keyboard separate. A chart using the new group field can then show the combined category. The underlying product rows remain available; the group does not delete or physically merge them.

An Other group can be useful when the source contains many values or new categories may arrive. It is still worth checking the resulting categories after a data refresh: a group is not the same as a general business rule that automatically understands which future values belong together.

Create expandable row levels with a Matrix

For a report where readers need to move between summary and detail, add a Matrix visual and place fields in its Rows well. The order matters: the first field is the outer level, and each field below it is a deeper level. For example, place Year first, Quarter second, and Month third to make a time hierarchy.

  1. Select the Matrix visual in the Visualizations pane.
  2. Drag the field for the broadest grouping into Rows, followed by the detail fields in the order readers should explore them.
  3. Place a measure, such as Sales Amount, in Values. Add a field to Columns only if you also want a cross-tab layout.
  4. Use the expand and drill controls on the visual to reveal lower levels. Depending on the visual and formatting settings, you can also show plus and minus icons beside row headings.

With Region, City, and Store in Rows, the matrix can display sales by region first and reveal cities or stores beneath a selected region. A measure is aggregated at each visible level. For example, the regional total is calculated from the sales records that belong to that region; expanding the row exposes a more detailed breakdown rather than changing the records.

A Matrix can also show subtotals and a grand total. Review the formatting options for row subtotals and the overall total so the displayed numbers match the purpose of the report. If you want the visual to open at a particular level, set up its initial expansion state and test how it looks after publishing.

Choose the right method for the task

Use the feature that matches the result you need. A useful way to decide is to ask whether you are changing the visual structure, combining labels, or transforming the data for reuse.

  • Matrix rows: Choose this for expandable hierarchies, nested summaries, and subtotals. It organizes a report visual without combining the source categories into a new label.
  • Power BI groups: Choose this for quick, report-model groupings of selected values, such as combining a handful of product types into “Other.”
  • Power Query: Choose a conditional column or a maintained mapping table when category assignments should be repeatable, documented, or applied during data preparation.
  • DAX calculated column: Consider this when classification logic belongs in the semantic model and should be expressed as a model rule. Keep the rule maintainable and test how it handles blank or unexpected values.
  • Power Query Group By: Use this when you actually intend to aggregate records during data preparation, not merely to label values together in a report.

For instance, a one-off report that combines five product labels may be well served by a group. If several reports must use the same product families, or the categories change regularly, a centrally maintained mapping table is often easier to govern. Consistency matters: if each report author creates a separate set of groups, the same product might be classified differently across reports.

Make category rules reusable

When group definitions are business rules rather than temporary presentation choices, build them into a repeatable data process. In Power Query, use Home > Transform data to open the editor, then add a Conditional Column from Add Column > Conditional Column. Set explicit conditions for the values that belong to each category and provide a deliberate result for unmatched values.

For larger or frequently changing classifications, a mapping table can be clearer than a long list of conditional rules. It might contain one row per source product and a corresponding reporting category. Relate or merge that mapping with the source data using the appropriate key, and confirm that each source value maps as intended. A mapping table also makes it easier for data owners to review category changes.

Be careful with Group By in Power Query. That command groups rows and calculates aggregations such as sums or counts, typically producing a smaller summarized table. It is not simply a command to rename or bundle labels while keeping every detail row. If you need detail records with a new category label, add or merge a classification column instead.

Sort, filter, and check totals

Grouping can change the order in which categories appear, so check whether the default sort is meaningful. Alphabetical order may be fine for product names but awkward for categories such as “Low,” “Medium,” and “High,” or for fiscal periods. A separate sort-order column in the model can support a deliberate order for reusable categories; verify that the visual uses the intended sort.

Filters also affect what readers see. A filter on the original field can exclude values that would otherwise appear under a group, while a filter on the group field can hide an entire combined category. When a total seems unexpected, inspect filters at the visual, page, and report levels, and confirm which field the visual uses.

Check how blank values and unmatched values are represented. A blank in the source is not necessarily the same thing as a named “Unknown” category. If the distinction matters, define it deliberately in the data preparation or model rules. After a refresh, compare category counts and totals against a known source or another trusted visual, especially when group assignments have changed.

Common problems and limitations

  • Expecting a Table to expand: A Table visual lists fields in columns; it does not provide the nested expand-and-collapse row behavior of a Matrix. Switch to a Matrix for hierarchical rows.
  • Seeing repeated labels: A Matrix may repeat row labels depending on its layout settings. Adjust the matrix row-header layout and test the result rather than assuming the data has been duplicated.
  • Seeing one total instead of detail: Check that the intended fields are in Rows and the measure is in Values. A field placed in Values may be summarized rather than displayed as a row category.
  • Not finding New group: Confirm that you are working in Power BI Desktop and have selected a supported model column in the Data or Fields pane. Available actions can differ when using a live connection or a model you cannot edit.
  • Unexpected categories after refresh: Review how newly arriving values are handled. If the classification must follow a stable rule, use a managed mapping or transformation instead of relying on a one-time manual selection.
  • Confusing a group with data aggregation: A group field categorizes values for analysis; it does not itself calculate a sum or remove detail rows. Measures and visual context determine the displayed totals.

Also remember that a group created for one column is not a universal relationship among several columns. Combining product names does not automatically combine customers, dates, or other fields. If the desired category depends on multiple attributes, define that logic in a transformation or model rule where those attributes can be evaluated together.

Frequently Asked Questions

Can I group rows in a Power BI Table visual?

Not as expandable, nested rows. Use a Matrix visual for expandable row levels. You can put a Power BI group field in a Table to display a combined category as a column, but that does not add expand-and-collapse behavior.

How do I group several values into one category?

In Power BI Desktop, right-click the relevant column in the Data or Fields pane and choose New group. Select the values, create and name a group, and then use the resulting group field in your visual.

Can I group numeric values into ranges?

Yes. For a numeric column, use New group and choose the binning option in the dialog, then set the bin size or number of bins as appropriate. Check the boundaries and labels against your reporting requirements before using the bins in a visual.

Do Power BI groups change the source data?

No. A group is a field in the Power BI model; it does not rewrite the source file or merge its records. If you need the category included in an exported or shared data source, create it in the source system or a data transformation step instead.

What is the difference between a Matrix and a group?

A Matrix arranges fields into expandable row levels and can display subtotals. A group combines selected values from a column into a new reporting category. Use a Matrix for hierarchy and a group for recategorizing values; some reports use both.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.