Forum Discussion
Power BI Report Builder - Grouping Issue
- 10 months ago
Hi Anonymous ,
Regarding the expand/collapse functionality, you’re right that it’s available by default only when using the Matrix Wizard, but you can still enable this feature manually within your current design. To achieve this, open the Design View and select the row group (for example, your first dimension level) in the Row Groups pane. Then, go to Group Properties - Visibility. Set the Initial visibility to Hidden if you want the group to start collapsed, and under Display can be toggled by this report item, select the textbox from the parent group header that will control the expand/collapse behavior. Repeat this step for each sub-group, ensuring that every child group’s visibility is toggled by its parent’s textbox. This setup will allow hierarchical expand/collapse just like the matrix wizard provides. Also, make sure that your row groups and detail rows use the same dataset fields to maintain correct aggregations and prevent mismatched values like before. If your main requirement is simply to keep the matrix structure while ensuring interactivity, another option is to start with the Matrix Wizard, generate the layout, and then switch to Design View to customize expressions or remove unwanted totals this way, the toggling functionality remains intact. This approach gives you both correct grouping behavior and dynamic expand/collapse control without depending entirely on the wizard defaults.
hey v-sshirivolu
Have done as you suggested but seems, second level of nested group has once more the issue with aggregating lines:
and then when I expand to another level I see the same "Internal PL Name", which aggreagtes wrong nesting.
Hi Anonymous ,
Thanks for trying the earlier steps. If the second-level group is still aggregating incorrectly, it usually means one of two things, either that group is still using the wrong field to group on, or the dataset has duplicate level-1/level-2 combinations. Even if the groups look nested correctly in the designer, Report Builder can still end up grouping on the same field (like “Internal PL Name”) at more than one level, which would explain why you’re seeing repeated values. Please open the Group Properties of the second-level group and double-check that both the Group on and Sort settings point only to the correct level-2 field and not the parent field. If those are set correctly, the next thing to verify is the data itself, running a quick SELECT DISTINCT on your level-1 and level-2 fields will tell you whether any duplicate pairs exist, since even one duplicate can cause the behavior shown in your screenshot. An easy way to narrow it down is to temporarily keep only the first two groups and preview the report. If level 2 still repeats, the issue is with its grouping or the data, if it doesn’t, the problem is coming from a lower level.