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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Elia90
Regular Visitor

Matrix Totals Not changing with JSON theme

Hi all, 

 

Long time user, first time poster. I am trying to create a theme for my Power BI report using JSON however; for some reason the column totals keep coming up black. I've looked around but can't seem to find an answer to the problem. For context here is my JSON as well as what my matrix currently looks like. As you can see the bottom row and final column has a black background and white font colour. Does anyone know of a solution to this?

 

Elia90_0-1690372535679.png

 

 

 

{
	"name": "MatrixTemplate",
	"visualStyles": {
		"pivotTable": {
			"*": {
                "general": [{
					"responsive": true,
					"keepLayerOrder": true
				}],
				"background": [{
					"show": true,
					"color": { "solid": { "color": "#FFFFFF"}},
					"transparency": 0
				}],
				"border": [{
					"color": { "solid": { "color": "#808080"}},
					"show": true,
					"radius": 0
				}],
				"title": [{
					"show": true,
					"fontColor": { "solid": { "color": "#000000" } },
					"background": { "solid": { "color": "#FFFFFF" } },
					"alignment": "center"
				}],	
					"stylePreset":[{
                    			"name":"Condensed"
                			}],
					"grid": [{
					"gridVertical": true,
					"gridVerticalColor": { "solid": { "color": "#E6E6E6"}},
					"gridVerticalWeight": 1,
					"gridHorizontal": true,
					"gridHorizontalColor": { "solid": { "color": "#E6E6E6"}},
					"gridHorizontalWeight": 1,
					"rowPadding": 1,
					"outlineColor": { "solid": { "color": "#E6E6E6"}},
					"outlineWeight": 1,
					"textSize": 14,
					"imageHeight": 100
				}],
				"columnHeaders": [{
					"fontColor": { "solid": { "color": "#FFFFFF"}},
					"backColor": { "solid": { "color": "#442359"}},
					"outline": "Frame",
					"autoSizeColumnWidth": true,
					"fontFamily": "'Segoe UI', wf_segoe-ui, helvetica, arial, sans-serif",
					"fontSize": 8,
					"alignment": "Left",
					"titleAlignment": "Right",
					"urlIcon": true,
					"wordWrap": true
				}],
				"rowHeaders": [{
					"fontColor": { "solid": { "color": "#333333"}},
					"backColor": { "solid": { "color": "#442359"}},
					"outline": "Frame",
					"stepped": true,
					"steppedLayoutIndentation": 12,					
					"urlIcon": true,
					"wordWrap": true,
					"fontFamily": "'Segoe UI', wf_segoe-ui, helvetica, arial, sans-serif",
					"fontSize": 8,
					"alignment": "Left", 
					"showExpandCollapseButtons":true
				}],
				"values": [{
					"fontColorPrimary": { "solid": { "color": "#333333"}},
					"backColorPrimary": { "solid": { "color": "#FFFFFF"}},
					"fontColorSecondary": { "solid": { "color": "#333333"}},
					"backColorSecondary": { "solid": { "color": "#E7E7E7"}},
					"bandedRowHeaders": true,
					"valuesOnRow": true,
					"outline": "Frame",
					"urlIcon": true,
					"wordWrap": true,
					"fontFamily": "'Segoe UI', wf_segoe-ui, helvetica, arial, sans-serif",
					"fontSize": 8
				}],
				"subTotals": [{
					"rowSubtotals": true,
					"columnSubtotals": true,
					"fontColor": { "solid": { "color": "#FFFFFF"}},
					"fontFamily": "'Segoe UI', wf_segoe-ui, helvetica, arial, sans-serif",
					"backColor": { "solid": { "color": "#FFFFFF"}},
					"fontSize": 8,
					"applyToHeaders": true,
					"rowSubtotalsPosition": "Bottom",
					"perRowLevel": true,
					"perColumnLevel": true					
				}],
				"total": [{
					"fontColor": { "solid": { "color": "#FFFFFF"}},
					"fontFamily": "'Segoe UI', wf_segoe-ui, helvetica, arial, sans-serif",
					"backColor": { "solid": { "color": "#FFFFFF"}},
					"columnGrandTotal": {
						"fontColor": { "solid": { "color": "#FFFFFF"}},
						"backColor": { "solid": { "color": "#00B8DD"}}
					},
					"applyToHeaders": true,
					"fontSize": 8
				}]
			}
		}
	}
}

 

1 REPLY 1
ailinnesse
Frequent Visitor

I found the solution, it is not intuitive, but works!
You need to get column and row total:

"columnTotal": [{
         
          "backColor": { "solid": { "color": "#FFFFFF"}},
          "applyToHeaders": true
        }],
       
"rowTotal": [{
         
          "backColor": { "solid": { "color": "#FFFFFF"}},
          "applyToHeaders": true
        }],

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors