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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
ArdraM
Frequent Visitor

Applying theme to Sub Totals of matrix

Hi Team,

 

I want to give different colors to row and column subtotals. In the theme file there is only a single subtotals section, where as in Power BI desktop we have different sections for row subtotals and column subtotals. How can I color them differently via theme.json file? What is the json code for that?

 

Thanks in advance.

1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @ArdraM ,

 

Power BI’s theme.json only supports a single subtotals style that applies to both row and column subtotals. Even though the Power BI Desktop UI allows you to format them separately, the theme file doesn’t distinguish between them. For example, if you include the following in your theme:

"visualStyles": {
  "*": {
    "*": {
      "subtotals": [
        {
          "color": "#000000",
          "fontSize": 12,
          "fontFamily": "Segoe UI",
          "fontWeight": "bold"
        }
      ]
    }
  }
}

it will apply to both row and column subtotals across all visuals. There is currently no way to assign different colors to row versus column subtotals via theme. If you need them styled differently, you’ll have to do it manually in the formatting pane inside Power BI Desktop.

 

Best regards,

View solution in original post

3 REPLIES 3
v-echaithra
Community Support
Community Support

Hi @ArdraM ,

Power BI’s theme.json file does not currently allow you to set the layout style such as "Outline", "Tabular", or "Stepped" for a matrix visual.

In Power BI Desktop, you can manually change this setting by:

Selecting the Matrix visual.
Going to the Format pane → Row headers → "Stepped layout" toggle.
Turning it off sets the matrix to "Tabular" layout, and turning it on gives you the "Outline"/"Stepped" layout.

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

Thanks and Regards,
Chaithra E.

ArdraM
Frequent Visitor

Thank you very much @DataNinja777 . Can you please tell me if there is a way to change the layout from "outline" to "tabular" ?

DataNinja777
Super User
Super User

Hi @ArdraM ,

 

Power BI’s theme.json only supports a single subtotals style that applies to both row and column subtotals. Even though the Power BI Desktop UI allows you to format them separately, the theme file doesn’t distinguish between them. For example, if you include the following in your theme:

"visualStyles": {
  "*": {
    "*": {
      "subtotals": [
        {
          "color": "#000000",
          "fontSize": 12,
          "fontFamily": "Segoe UI",
          "fontWeight": "bold"
        }
      ]
    }
  }
}

it will apply to both row and column subtotals across all visuals. There is currently no way to assign different colors to row versus column subtotals via theme. If you need them styled differently, you’ll have to do it manually in the formatting pane inside Power BI Desktop.

 

Best regards,

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.