Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi ,
I have a basic theme I use and have used for years. It has always worked pretty well. I have just noticed that it is no longer formatting grand totals in a matrix properly anymore.
I was using the below (which is just a snippet) json which always did the trick but now it doesn't.
"visualStyles": {
"*": {
"*": {
"*": [
"total": [
{
"fontColor": {
"solid": {
"color": "#FFF"
}
},
"backColor": {
"solid": {
"color": "#215AA8"
}
},
"fontSize": 12
}
]
}
}
}
I also tried adding this to the theme file as a test to see if that was an issue but the grand total remains unchanged.
"pivotTable": {
"*": {
"subTotals": [{
"backColor": { "solid": { "color": "#01B8AA"}}
}],
"total": [{
"fontSize": 14,
"fontFamily": "Courier New"
}]
}
}
Does anyone know what the settings are (if any ) for these properties in a theme file?
Solved! Go to Solution.
I would appreciate it if you can accept my answer as the solution. Thanks in advance.
I was using the url to try to set these which is excellent but now looks slightly out of date now.
PowerBI-ThemeTemplates/Matrix.json at master · deldersveld/PowerBI-ThemeTemplates · GitHub
I used this to set the Totals for columns and rows
"pivotTable":{
"*":{
"rowTotal":[
{
"fontColor":{"solid":{"color":"#FFFFFF"}},
"fontFamily":"Calibri",
"backColor":{"solid":{"color":"#4B4F54"}},
"applyToHeaders": true,
"fontSize": 12
}],
"columnTotal":[
{
"fontColor":{"solid":{"color":"#FFFFFF"}},
"fontFamily":"Calibri",
"backColor":{"solid":{"color":"#4B4F54"}},
"applyToHeaders": true,
"fontSize": 12
}]
}
}
I was using the url to try to set these which is excellent but now looks slightly out of date now.
PowerBI-ThemeTemplates/Matrix.json at master · deldersveld/PowerBI-ThemeTemplates · GitHub
I used this to set the Totals for columns and rows
"pivotTable":{
"*":{
"rowTotal":[
{
"fontColor":{"solid":{"color":"#FFFFFF"}},
"fontFamily":"Calibri",
"backColor":{"solid":{"color":"#4B4F54"}},
"applyToHeaders": true,
"fontSize": 12
}],
"columnTotal":[
{
"fontColor":{"solid":{"color":"#FFFFFF"}},
"fontFamily":"Calibri",
"backColor":{"solid":{"color":"#4B4F54"}},
"applyToHeaders": true,
"fontSize": 12
}]
}
}
@Typhoon74 sorry I didn't flag you answer as a solution which it was in 2022, now with all the recent upgrades I had to remove all my textClasses inputs as it threw an error on import. Now I am back in the same boat. using the totals tag in pivotTable doesn't seem to make the slightest difference???
So now I have got most of this working but for some reason I can modify the fontSize ok, but whatever I do I cannot modify the fontFamily. I use this code which changes the size but not the font itself. Anyone point me in the right direction?
"visualStyles": {
"pivotTable": {
"*": {
"subTotals": [
{
"rowSubtotals": true,
"columnSubtotals": true,
"fontColor": {
"solid": {
"color": "#FFF"
}
},
"fontFamily": "Calibri",
"backColor": {
"solid": {
"color": "#44B2E8"
}
},
"fontSize": 10,
"applyToHeaders": true,
"rowSubtotalsPosition": "Top",
"perRowLevel": false,
"perColumnLevel": false
}
],
"values": [{
"fontFamily": "Calibri",
"fontSize": 10
}]
}
}
Hi @gooranga1 ,
I have a related question, did you figure out how to enable Apply to Label in the JSON file?
That is what I am currently struggling with.
Thanks Dirk
it seems it is rowTotal
If you don't need to have a different font type and font size you can define it globally in the textClasses
"textClasses":{
"label":{
"fontFace":"Calibri","fontSize":11
},
"callout":{
"fontFace":"Calibri"
},
"title":{
"fontFace":"Calibri"
},
"header":{
"fontFace":"Calibri"
}
},
Hi @Typhoon74 yes thanks I tried that and it seems to do what I need, I just thought you could get more control of individual visualisations but it doesn't look like we do.
I would appreciate it if you can accept my answer as the solution. Thanks in advance.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
96 | |
90 | |
79 | |
67 |
User | Count |
---|---|
150 | |
118 | |
111 | |
106 | |
95 |