Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi All,
I don't seem to be able to get my theme to apply to the grand total (column or row) on a matrix.. I know it's for pivotTable, but can anyone enlighten me as to the name of the attribute?
I've tried total, totals, grandTotal, etc etc etc.
Many thanks,
Dayna
The solution is in applying the background to row and column totals separately
"columnTotal": [{
"backColor": { "solid": { "color": "#FFFFFF"}},
"applyToHeaders": true
}],
"rowTotal": [{
"backColor": { "solid": { "color": "#FFFFFF"}},
"applyToHeaders": true
}],
Hello @v-xiaotang
Thanks for this, when I've tried with the theme I've got, the font certainly changes - but the back colour remains black. I suspect there's something in my theme overwriting this, for only the matrix, but it's not obvious!
Here's my current theme:
{
"name": "Nice-Pak Revised Theme v3",
"background": "#ffffff",
"backgroundLight": "#ffffff",
"backgroundNeutral": "#6109d4",
"foreground": "#000000",
"foregroundNeutralSecondary": "#812feb",
"foregroundNeutralTertiary": "#db00ba",
"tableAccent": "#4c86ed",
"dataColors": [
"#a17cdc",
"#118DFF",
"#750985",
"#C83D95",
"#FF985E",
"#1DD5EE",
"#42F7C0",
"#3049AD",
"#F64F5C",
"#3599B8",
"#DFBFBF",
"#4AC5BB",
"#5F6B6D",
"#FB8281",
"#F4D25A",
"#7F898A",
"#A4DDEE",
"#FDAB89",
"#B687AC",
"#28738A",
"#A78F8F",
"#168980",
"#293537",
"#BB4A4A",
"#B59525",
"#475052",
"#6A9FB0",
"#BD7150",
"#7B4F71",
"#1B4D5C",
"#706060",
"#0F5C55",
"#1C2325",
"#812feb",
"#6109d4",
"#a17cdc",
"#F5F0FF",
"#E7E6E8",
"#F3F3F3",
"#685eeb"
],
"good": "#1ac770",
"neutral": "#edcc68",
"bad": "#991232",
"maximum": "#c75454",
"center": "#a6edac",
"minimum": "#c75454",
"null": "#efbfbf",
"textClasses": {
"callout": {
"fontSize": 20,
"fontFace": "Calibri",
"color": "#812FEB"
},
"title": {
"fontSize": 14,
"fontFace": "Calibri",
"color": "#812FEB"
},
"largeTitle": {
"fontSize": 12,
"fontFace": "Calibri",
"color": "#812FEB"
},
"header": {
"fontSize": 12,
"fontFace": "Calibri",
"color": "#535353"
},
"label": {
"fontSize": 10,
"fontFace": "Calibri",
"color": "#535353"
},
"lightLabel": {
"color": "#3e3e3e"
},
"largeLightLabel": {
"color": "#3e3e3e"
},
"smallLightLabel": {
"color": "#3e3e3e"
}
},
"visualStyles": {
"*": {
"*": {
"title": [
{
"show": true,
"fontColor": {
"solid": {
"color": "#e7e6e8"
}
},
"background": {
"solid": {
"color": "#685eeb"
}
},
"alignment": "center",
"fontSize": 10,
"fontFamily": "Calibri"
}
],
"background": [
{
"show": true,
"color": {
"solid": {
"color": "#f5f0ff"
}
},
"transparency": 25
}
],
"lockAspect": [
{
"show": true
}
],
"border": [
{
"show": true,
"color": {
"solid": {
"color": "#685eeb"
}
},
"radius": 5
}
],
"visualTooltip": [
{
"type": "Default"
}
],
"stylePreset": [
{
"name": "None"
}
],
"visualHeader": [
{
"foreground": {
"solid": {
"color": "#685eeb"
}
},
"border": {
"solid": {
"color": "#685eeb"
}
},
"showTooltipButton": true
}
],
"visualHeaderTooltip": [
{
"text": "Header tooltip text",
"titleFontColor": {
"solid": {
"color": "#6109d4"
}
},
"transparency": 0,
"background": {
"solid": {
"color": "#f3f3f3"
}
}
}
],
"dropShadow": [
{
"show": true,
"angle": 100,
"color": {
"solid": {
"color": "#f3f3f3"
}
},
"position": "Outer",
"preset": "Custom",
"shadowBlur": 5,
"shadowDistance": 2,
"shadowSpread": 2,
"transparency": 50
}
]
}
},
"page": {
"*": {
"background": [
{
"color": {
"solid": {
"color": "#f3f3f3"
}
},
"transparency": 20
}
],
"outspace": [
{
"color": {
"solid": {
"color": "#e7e6e8"
}
},
"transparency": 0
}
],
"outspacePane": [
{
"backgroundColor": {
"solid": {
"color": "#e7e6e8"
}
},
"foregroundColor": {
"solid": {
"color": "#812feb"
}
},
"borderColor": {
"solid": {
"color": "#812feb"
}
},
"transparency": 20,
"titleSize": 18,
"headerSize": 12,
"fontFamily": "Calibri",
"border": true
}
],
"filterCard": [
{
"$id": "Applied",
"backgroundColor": {
"solid": {
"color": "#812feb"
}
},
"foregroundColor": {
"solid": {
"color": "#ffffff"
}
},
"borderColor": {
"solid": {
"color": "#812feb"
}
},
"inputBoxColor": {
"solid": {
"color": "#ffffff"
}
},
"transparency": 0,
"textSize": 11,
"fontFamily": "Calibri",
"border": true
},
{
"$id": "Available",
"backgroundColor": {
"solid": {
"color": "#f5f0ff"
}
},
"foregroundColor": {
"solid": {
"color": "#3e3e3e"
}
},
"borderColor": {
"solid": {
"color": "#f5f0ff"
}
},
"inputBoxColor": {
"solid": {
"color": "#f5f0ff"
}
},
"transparency": 0,
"textSize": 10,
"fontFamily": "Calibri",
"border": true
}
]
}
},
"pivotTable": {
"*": {
"stylePreset": [
{
"name": "Condensed"
}
],
"grid": [
{
"gridVertical": true,
"gridVerticalColor": {
"solid": {
"color": "#a17cdc"
}
},
"gridVerticalWeight": 1,
"gridHorizontal": true,
"gridHorizontalColor": {
"solid": {
"color": "#a17cdc"
}
},
"gridHorizontalWeight": 1,
"rowPadding": 2,
"outlineColor": {
"solid": {
"color": "#a17cdc"
}
},
"outlineWeight": 1,
"textSize": 10,
"imageHeight": 100
}
],
"columnHeaders": [
{
"fontColor": {
"solid": {
"color": "#FFFFFF"
}
},
"backColor": {
"solid": {
"color": "#a17cdc"
}
},
"outline": "Frame",
"autoSizeColumnWidth": true,
"fontFamily": "Calibri",
"fontSize": 10,
"alignment": "Left",
"titleAlignment": "Right",
"urlIcon": true,
"wordWrap": true
}
],
"rowHeaders": [
{
"fontColor": {
"solid": {
"color": "#FFFFFF"
}
},
"backColor": {
"solid": {
"color": "#a17cdc"
}
},
"outline": "Frame",
"stepped": true,
"steppedLayoutIndentation": 12,
"urlIcon": true,
"wordWrap": true,
"fontFamily": "Calibri",
"fontSize": 10,
"alignment": "Left",
"showExpandCollapseButtons": true
}
],
"values": [
{
"fontColorPrimary": {
"solid": {
"color": "#000000"
}
},
"backColorPrimary": {
"solid": {
"color": "#e7e6e8"
}
},
"fontColorSecondary": {
"solid": {
"color": "#000000"
}
},
"backColorSecondary": {
"solid": {
"color": "#F3F3F3"
}
},
"bandedRowHeaders": true,
"valuesOnRow": true,
"outline": "Frame",
"urlIcon": true,
"wordWrap": true,
"fontFamily": "Calibri",
"fontSize": 10
}
],
"subTotals": [
{
"rowSubtotals": true,
"columnSubtotals": true,
"fontColor": {
"solid": {
"color": "#000000"
}
},
"fontFamily": "Calibri",
"backColor": {
"solid": {
"color": "#d1c1eb"
}
},
"fontSize": 10,
"applyToHeaders": true,
"rowSubtotalsPosition": "Bottom",
"perRowLevel": true,
"perColumnLevel": true
}
],
"total": [
{
"applyToHeaders": true,
"fontColor": {
"solid": {
"color": "#FFFFFF"
}
},
"fontFamily": "Calibri",
"backColor": {
"solid": {
"color": "#A17CDC"
}
},
"fontSize": 10
}
]
}
},
"tableEx": {
"*": {
"grid": [
{
"gridVertical": true,
"gridVerticalColor": {
"solid": {
"color": "#a17cdc"
}
},
"gridVerticalWeight": 1,
"gridHorizontal": true,
"gridHorizontalColor": {
"solid": {
"color": "#a17cdc"
}
},
"gridHorizontalWeight": 1,
"rowPadding": 2,
"outlineColor": {
"solid": {
"color": "#a17cdc"
}
},
"outlineWeight": 1,
"textSize": 14,
"imageHeight": 100
}
],
"columnHeaders": [
{
"fontColor": {
"solid": {
"color": "#FFFFFF"
}
},
"backColor": {
"solid": {
"color": "#a17cdc"
}
},
"outline": "Frame",
"autoSizeColumnWidth": true,
"fontFamily": "Calibri",
"fontSize": 10,
"alignment": "Left",
"wordWrap": true
}
],
"values": [
{
"fontColorPrimary": {
"solid": {
"color": "#000000"
}
},
"backColorPrimary": {
"solid": {
"color": "#E7E6E8"
}
},
"fontColorSecondary": {
"solid": {
"color": "#000000"
}
},
"backColorSecondary": {
"solid": {
"color": "#F3F3F3"
}
},
"outline": "Frame",
"urlIcon": true,
"wordWrap": true,
"fontFamily": "Calibri",
"fontSize": 10
}
],
"total": [
{
"totals": true,
"fontColor": {
"solid": {
"color": "#FFFFFF"
}
},
"backColor": {
"solid": {
"color": "#A17CDC"
}
},
"outline": "Frame",
"fontFamily": "Calibri",
"fontSize": 10
}
],
"stylePreset": [
{
"name": "BoldHeader"
}
]
}
},
"slicer": {
"*": {
"general": [
{
"outlineColor": {
"solid": {
"color": "#444444"
}
},
"outlineWeight": 1,
"orientation": "vertical",
"responsive": true
}
],
"data": [
{
"mode": "Basic",
"relativeRange": "",
"relativePeriod": ""
}
],
"selection": [
{
"selectAllCheckboxEnabled": false,
"singleSelect": true
}
],
"header": [
{
"show": true,
"fontColor": {
"solid": {
"color": "#000000"
}
},
"background": {
"solid": {
"color": ""
}
},
"outline": "None",
"textSize": 10,
"fontFamily": "Calibri"
}
],
"items": [
{
"fontColor": {
"solid": {
"color": "#000000"
}
},
"background": {
"solid": {
"color": ""
}
},
"outline": "None",
"textSize": 10,
"fontFamily": "Calibri"
}
],
"slider": [
{
"color": {
"solid": {
"color": "#812FEB"
}
}
}
]
}
},
"card": {
"*": {
"labels": [
{
"color": {
"solid": {
"color": "#e7e6e8"
}
},
"labelDisplayUnits": "0",
"labelPrecision": 0,
"fontSize": 25,
"fontFamily": "Calibri"
}
],
"categoryLabels": [
{
"show": true,
"color": {
"solid": {
"color": "#e7e6e8"
}
},
"fontSize": 14,
"fontFamily": "Calibri"
}
],
"wordWrap": [
{
"show": true
}
],
"background": [
{
"show": true,
"color": {
"solid": {
"color": "#A17CDC"
}
},
"transparency": 0
}
],
"title": [
{
"show": true,
"fontColor": {
"solid": {
"color": "#e7e6e8"
}
},
"background": {
"solid": {
"color": "#685eeb"
}
},
"alignment": "left",
"fontSize": 11,
"fontFamily": "Calibri"
}
],
"border": [
{
"show": true,
"color": {
"solid": {
"color": "#A17CDC"
}
}
}
]
}
},
"multiRowCard": {
"*": {
"dataLabels": [
{
"color": {
"solid": {
"color": "#812FEB"
}
},
"fontSize": 12,
"fontFamily": "Calibri"
}
],
"categoryLabels": [
{
"show": true,
"color": {
"solid": {
"color": "#000000"
}
},
"fontSize": 10,
"fontFamily": "Calibri"
}
],
"cardTitle": [
{
"color": {
"solid": {
"color": "#685eeb"
}
},
"fontSize": 10,
"fontFamily": "Calibri"
}
],
"card": [
{
"outline": "TopOnly",
"outlineColor": {
"solid": {
"color": "#000000"
}
},
"outlineWeight": 2,
"barShow": true,
"barColor": {
"solid": {
"color": "#812feb"
}
},
"barWeight": 2,
"cardPadding": 20,
"cardBackground": {
"solid": {
"color": "#E7E6E8"
}
}
}
]
}
},
"actionButton": {
"*": {
"visualHeader": [
{
"show": true
}
]
}
},
"image": {
"*": {
"imageScaling": [
{
"imageScalingType": "Normal"
}
]
}
}
}
}
Many thanks for your assistance,
Dayna
Hi @Dayna
Thanks for your reply.
Please check if this tutorial video helps, Deep dive on how to create Power BI themes with a JSON file - YouTube
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @Dayna
Thanks for reaching out to us.
After my testing, the following code works
{
"name": "Sample",
"visualStyles": {
"*": {
"*": {
"*": [
{
"responsive": true,
"wordWrap": true,
"fontSize": 10,
"backColorPrimary": { "solid": { "color": "#ffffff" } },
"backColorSecondary": { "solid": { "color": "#ededed" }},
"fontFamily": "Comic Sans MS"
}
],
"title": [
{
"show": true,
"fontColor": { "solid": { "color": "#535353" } },
"background": { "solid": { "color": "#ffffff" } },
"alignment": "center",
"fontSize": 12,
"fontFamily": "Comic Sans MS"
}
]
}
}
}
}
import theme
after my theme imported, the font has changed (in red box)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.