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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
lherbert501
Post Partisan
Post Partisan

JSON Theme Tables and Matrixes

Hi ,

 

Could somebody please help me and advise what I would have to add to my JSON theme to enable my tables and matrixes to change the font also?

 

Thanks

 

{
"name": "Custom",
"textClasses": {
"label": {
"fontFace": "''FONT TEST'"
},
"title": {
"fontFace": "''FONT TEST'"
}
},
"visualStyles": {
"*": {
"*": {
"titleText": [
{
"fontFace": "'FONT TEST'",
"fontBold": true
}
],
"subtitleText": [
{
"fontFace": "'Nimbus Sans L'",
"fontBold": true
}
]
}
}
}
}

1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @lherbert501 ,

 

To change the font for the content within your tables and matrices, you need to add specific styles for the tableEx (Table) and matrix visuals within the visualStyles section of your JSON theme. Your current theme is set up to target general titles and labels but doesn't include the properties for the data cells, headers, or totals inside those specific visuals.

Here is the complete JSON code you can use. It includes your original settings plus the necessary additions for tables and matrices.

{
    "name": "Custom",
    "textClasses": {
        "label": {
            "fontFace": "'FONT TEST'"
        },
        "title": {
            "fontFace": "'FONT TEST'"
        }
    },
    "visualStyles": {
        "*": {
            "*": {
                "titleText": [
                    {
                        "fontFace": "'FONT TEST'",
                        "fontBold": true
                    }
                ],
                "subtitleText": [
                    {
                        "fontFace": "'Nimbus Sans L'",
                        "fontBold": true
                    }
                ]
            }
        },
        "tableEx": {
            "*": {
                "columnHeaders": [
                    {
                        "fontFace": "'FONT TEST'"
                    }
                ],
                "values": [
                    {
                        "fontFace": "'FONT TEST'"
                    }
                ],
                "total": [
                    {
                        "fontFace": "'FONT TEST'"
                    }
                ]
            }
        },
        "matrix": {
            "*": {
                "columnHeaders": [
                    {
                        "fontFace": "'FONT TEST'"
                    }
                ],
                "rowHeaders": [
                    {
                        "fontFace": "'FONT TEST'"
                    }
                ],
                "values": [
                    {
                        "fontFace": "'FONT TEST'"
                    }
                ],
                "total": [
                    {
                        "fontFace": "'FONT TEST'"
                    }
                ]
            }
        }
    }
}

In this updated theme, the tableEx block targets all your Table visuals, while the matrix block targets all your Matrix visuals. Within each of these blocks, the columnHeaders property controls the font for the column headers, rowHeaders styles the row headers (for matrices), values applies the font to the main data cells, and total formats the grand total row.

Simply replace 'FONT TEST' with the name of the font you wish to use, save the JSON file, and import it into your Power BI report. It's important to remember that the font you specify must be installed on the computer of anyone viewing the report for it to display correctly. If it's not installed, Power BI will default to a standard font.

 

Best regards,

View solution in original post

2 REPLIES 2
DataNinja777
Super User
Super User

Hi @lherbert501 ,

 

To change the font for the content within your tables and matrices, you need to add specific styles for the tableEx (Table) and matrix visuals within the visualStyles section of your JSON theme. Your current theme is set up to target general titles and labels but doesn't include the properties for the data cells, headers, or totals inside those specific visuals.

Here is the complete JSON code you can use. It includes your original settings plus the necessary additions for tables and matrices.

{
    "name": "Custom",
    "textClasses": {
        "label": {
            "fontFace": "'FONT TEST'"
        },
        "title": {
            "fontFace": "'FONT TEST'"
        }
    },
    "visualStyles": {
        "*": {
            "*": {
                "titleText": [
                    {
                        "fontFace": "'FONT TEST'",
                        "fontBold": true
                    }
                ],
                "subtitleText": [
                    {
                        "fontFace": "'Nimbus Sans L'",
                        "fontBold": true
                    }
                ]
            }
        },
        "tableEx": {
            "*": {
                "columnHeaders": [
                    {
                        "fontFace": "'FONT TEST'"
                    }
                ],
                "values": [
                    {
                        "fontFace": "'FONT TEST'"
                    }
                ],
                "total": [
                    {
                        "fontFace": "'FONT TEST'"
                    }
                ]
            }
        },
        "matrix": {
            "*": {
                "columnHeaders": [
                    {
                        "fontFace": "'FONT TEST'"
                    }
                ],
                "rowHeaders": [
                    {
                        "fontFace": "'FONT TEST'"
                    }
                ],
                "values": [
                    {
                        "fontFace": "'FONT TEST'"
                    }
                ],
                "total": [
                    {
                        "fontFace": "'FONT TEST'"
                    }
                ]
            }
        }
    }
}

In this updated theme, the tableEx block targets all your Table visuals, while the matrix block targets all your Matrix visuals. Within each of these blocks, the columnHeaders property controls the font for the column headers, rowHeaders styles the row headers (for matrices), values applies the font to the main data cells, and total formats the grand total row.

Simply replace 'FONT TEST' with the name of the font you wish to use, save the JSON file, and import it into your Power BI report. It's important to remember that the font you specify must be installed on the computer of anyone viewing the report for it to display correctly. If it's not installed, Power BI will default to a standard font.

 

Best regards,

Thankyou @DataNinja777 this is very helpful 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors