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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Garrysfarrell
Frequent Visitor

Theme JSON code for Total labels

I am using this code to control the data labels for the Stacked Bar Chart. However, I want to add the "Total labels" to the theme JSON file but I cannot find any documentation for the Total labels. I checked these pages but they may be out of date. https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes

https://powerbi.tips/tools/report-theme-generator-v3/

https://github.com/deldersveld/PowerBI-ThemeTemplates

 

Garrysfarrell_0-1629876530923.png

 

"barChart": {

...

,
"labels": [
{
"show": true,
"color": { "solid": { "color": "#FFFFFF" } },
"fontSize": 9,
"fontFamily": "Segoe UI"
}

 

 

1 ACCEPTED SOLUTION
rogerlight
Frequent Visitor

Hi @Garrysfarrell ,

 

Here's what you need to add to your barChart theme section:

 

"totals": [
{
"show": true,
"color": { "solid": { "color": "#FFFFFF" } },
"fontSize": 9,
"fontFamily": "Segoe UI"
}
],


You can sometimes discover the correct terminology by looking in the Layout file inside the unzipped PBIX file.

Hope that helps!

Regards,
Roger

View solution in original post

5 REPLIES 5
rogerlight
Frequent Visitor

Hi @Garrysfarrell ,

 

Here's what you need to add to your barChart theme section:

 

"totals": [
{
"show": true,
"color": { "solid": { "color": "#FFFFFF" } },
"fontSize": 9,
"fontFamily": "Segoe UI"
}
],


You can sometimes discover the correct terminology by looking in the Layout file inside the unzipped PBIX file.

Hope that helps!

Regards,
Roger

Garrysfarrell
Frequent Visitor

Didn't seem to work. I tried all variations of what I thought may be errors.

"show Total" --> "showTotal"

"TotalLable" --> "TotalLabel"

"TotalLable" --> "totalLabel"

"TotalLable" --> "totalLable"

 

v-kelly-msft
Community Support
Community Support

Hi  @Garrysfarrell ,

 

Check the newly updated one:

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes

vkellymsft_0-1630053974042.png

 

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

I used this code. Not sure if this is correct but it didn't work. Pic below highlighting the "Total Labels" that I'm trying to change with the theme.

"total": [
{
"show": true,
"color": { "solid": { "color": "#448822" } },
"fontSize": 9,
"fontFamily": "Arial"
}
]

Garrysfarrell_0-1630402368301.png

 

Hi @Garrysfarrell

 

Try below json code:

"total": [
{
"show Total": true,
"TotalLable":"Total",
"color": { "solid": { "color": "#448822" } },
"fontSize": 9,
"fontFamily": "Arial"
}
]

Or check below blog for help:

https://zebrabi.com/power-bi-themes/

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

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.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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