Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
achal90
Regular Visitor

Remove expand/collapse option (+/-) for rows which don't have subrows in a matrix

Below is the image in which we can see we don't have subrows for quantity in tons, Gross sales ,Discount,Net sales and prime cost but still there is expand/collapse sign is there how can we get rid of this this is very urgently i needed if

someone could give me reply asap then it would be great thanks in advance MicrosoftTeams-image (14).png

3 REPLIES 3
123abc
Community Champion
Community Champion

  1. Open your Power BI report and navigate to the page where you have the matrix visual that you want to modify.

  2. Select the matrix visual that you want to change. You should see a "Fields" pane on the right side of the Power BI Desktop interface.

  3. In the "Fields" pane, locate the field that you are using to create the hierarchy or grouping in your matrix. It's usually placed in the "Rows" or "Columns" section of the visual.

  4. Click on the field you want to modify to select it.

  5. In the "Format" section of the "Visualizations" pane (which is typically on the right side of the Power BI interface), look for the option called "Subtotals" or "Expand/collapse."

  6. Set the "Subtotals" or "Expand/collapse" option to "None" or "Do not show" (the exact wording may vary depending on your Power BI version).

  7. Save your changes, and you should now see that the expand/collapse icons are removed for rows that don't have subrows.

  8. Refresh your report, and the changes should take effect.

By setting the "Subtotals" or "Expand/collapse" option to "None," you are essentially telling Power BI not to display the expand/collapse icons for rows that don't have subrows, which should give you the desired result.

Please note that the specific interface and options may vary slightly depending on the version of Power BI you are using, but the general steps should be similar.

 
 
 

thanks a lot for replying but this is not what i want if i will do the way you have mentioned then all (+/-) will get removed but i wanna remove where there is no subrows as you can see there is Total material variance under Total Material Variance there is subrows so i want (+/-) for this.

123abc
Community Champion
Community Champion

I see, you want to keep the expand/collapse option for rows with subrows but remove it for rows that don't have any subrows. Unfortunately, as of my last knowledge update in September 2021, Power BI doesn't provide an out-of-the-box feature to selectively remove the expand/collapse option for specific rows based on the presence of subrows.

One possible workaround to achieve this effect is to create a custom hierarchy in your data model that only includes the rows for which you want to keep the expand/collapse option. Here's a simplified example of how you might structure your data model:

  1. Create a separate table in your data model that contains the rows for which you want to keep the expand/collapse option (e.g., the rows with subtotals like "Total Material Variance").

  2. Create a relationship between this new table and your main data table, ensuring that it relates the rows you want to keep with the relevant data.

  3. In your matrix visualization, use this custom hierarchy instead of the original hierarchy. This custom hierarchy should only include the rows for which you want to allow expand/collapse.

By using a custom hierarchy that includes only the rows with subtotals, you can effectively achieve the desired behavior of keeping the expand/collapse option for those rows and excluding it for other rows without subtotals.

Please note that this approach may require restructuring your data and creating relationships, and it might not be suitable for all scenarios. Power BI's features may have evolved since my last update, so you may want to check the latest documentation or community forums for any new features or customizations related to expand/collapse functionality.

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors