Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi,
I'm creating a json theme file and working as expected for most things.
Have the pivot table format but when try and format the colour and font on GrandTotal line not working.
sub-totals working o.k.
Tried
,"grandTotals":[
{
"backColor":{"solid":{"color":"#ffff00"}},
"fontColor":{"solid":{"color":"#008000
"}},
"fontFamily":"Arial"
}]
Tried "Grand Total" "grandTotals" "Totals" 2Total" as well but still not working.
Anyonw know if possible to format Grand Total/totals font and bgcolour in same way can other properties of the pivot table?
Solved! Go to Solution.
Hi,
Just to let you know managed to get the Totals to work on pivottable with json using below
,"total": [{
"fontColor": { "solid": { "color": "#ffffff"}},
"backColor": { "solid": { "color": "#063d73"}},
"outline": "Frame",
"fontSize": 10
}]
@po Could you please share the complete json file that you are trying to import.
Are you able to successfully import the theme file (json) successfully but the GrandTotals colours are not reflecting ? Or you are not able to import the file itself with the GrandTotals colour coding in the json file.
Proud to be a PBI Community Champion
Able to import file fine.
However, whatever try put in totals of pivot table not reflected.
Also when try put datacolours for line chart local visual not working either.
code below.
{ "name": "sample theme", "dataColors":["#063d73","#FD625E", "#01B8AA", "#F2C80F", "#A66999","#FFFFFF", "#000000","#F283aF","#808080","#c5c5c5","#ededed","#005440","#9F7546","#668773","#ed2038","#Febe10","#6F63a7","#F283aF"] ,"background":"#9bb3d7" ,"foreground":"#FFFFFF" ,"tableAccent":"#2a6ebb" ,"visualStyles":{ "*":{ "*":{ "title": [{ "show": true, "fontColor": { "solid": { "color": "#063d73" } }, "background": { "solid": { "color": "#FFFFFF" } }, "alignment": "center", "fontSize": 11, "fontFamily": "Tahoma" }], "background": [{ "show": true, "color": { "solid": { "color": "#FFFFFF" } }, "transparency": 50 }], "lockAspect": [{ "show": true }], "border": [{ "show": true, "color": { "solid": { "color": "#063d73" } } }], "visualTooltip": [{ "type": "Default" }], "stylePreset": [{ "name": "None" }], "page": { "*": { "background": [{ "color": { "solid": { "color": "#FFFFFF" } }, "transparency": 25 }], "outspace": [{ "color": { "solid": { "color": "#004753" } }, "transparency": 0 }] } } , "*":[{"fontSize":8,"fontFamily":"Tahoma","color":{"solid":{}}}] } }, "pivotTable": { "*": { "values": [{ "fontColorPrimary": { "solid": { "color": "#ffffff"}}, "backColorPrimary": { "solid": { "color": "#2a6ebb"}}, "fontColorSecondary": { "solid": { "color": "#ffffff"}}, "backColorSecondary": { "solid": { "color": "#9bb3d7"}} }] ,"columnHeaders":[ { "fontColor":{"solid":{"color":"#ffffff"}}, "backColor":{"solid":{"color":"#063d73"}}, "fontFamily":"Tahoma" }] ,"rowHeaders":[ { "fontColor":{"solid":{"color":"#ffffff"}}, "backColor":{"solid":{"color":"#063d73"}}, "fontFamily":"Tahoma" }] ,"totals":[ { "backColor":{"solid":{"color":"#ffff00"}}, "fontFamily":"Arial" }], "grid": [ { "outlineColor": { "solid": { "color": "#063d73" } }, "gridVertical":true, "gridVerticalColor":{"solid":{"color":"#2a6ebb"}}, "gridHorizontal":true, "gridHorizontalColor":{"solid":{"color":"#9bb3d7"}} } ] ,"subTotals":[ { "fontColor":{"solid":{"color":"#ffffff"}}, "fontFamily":"Tahoma" }] } } ,"tableEx": { "*": { "grid": [{ "gridVertical": true, "gridVerticalColor": { "solid": { "color": "#063d73"}}, "gridVerticalWeight": 2, "gridHorizontal": true, "gridHorizontalColor": { "solid": { "color": "#063d73"}}, "gridHorizontalWeight": 2, "rowPadding": 2, "outlineColor": { "solid": { "color": "#063d73"}}, "outlineWeight": 2, "textSize": 14, "imageHeight": 100 }], "columnHeaders": [{ "fontColor": { "solid": { "color": "#ffffff"}}, "backColor": { "solid": { "color": "#063d73"}}, "outline": "Frame", "autoSizeColumnWidth": true, "fontSize": 12, "alignment": "Left", "wordWrap": true }], "values": [{ "fontColorPrimary": { "solid": { "color": "#2a6ebb"}}, "backColorPrimary": { "solid": { "color": "#2a6ebb"}}, "fontColorSecondary": { "solid": { "color": "#9bb3d7"}}, "backColorSecondary": { "solid": { "color": "#9bb3d7"}}, "outline": "Frame", "urlIcon": true, "wordWrap": true, "fontSize": 8 }], "total": [{ "totals": true, "fontColor": { "solid": { "color": "#ffffff"}}, "backColor": { "solid": { "color": "#063d73"}}, "outline": "Frame", "fontSize": 10 }] } } ,"gauge": { "*": { "dataPoint": [{ "fill": { "solid": { "color": "#063d73"}}, "target": { "solid": { "color": "#ff0000"}} }] ,"labels": [{ "show": true, "color": { "solid": { "color": "#063d73"}}, "labelDisplayUnits": "0", "labelPrecision": 1, "fontSize": 10, "fontFamily": "Tahoma" }] ,"target": [{ "show": true, "color": { "solid": { "color": "#063d73"}}, "labelDisplayUnits": "0", "labelPrecision": 1, "fontSize": 10, "fontFamily": "Tahoma" }] ,"background": [{ "transparency": 0, "color": { "solid": { "color": "#FFFFFF"}} }] ,"title": [{ "show":true, "color": { "solid": { "color": "#063d73"}}, "fontSize": 10, "fontFamily": "Tahoma" }] } } ,"clusteredColumnChart": { "*": { "general": [{ "responsive": true }] ,"background": [{ "transparency": 0, "color": { "solid": { "color": "#FFFFFF"}} }] , "categoryAxis": [{ "show": true, "labelColor": { "solid": { "color": "#063d73"}}, "fontSize": 14, "titleColor": { "solid": { "color": "#063d73"}}, "titleText": "asdf", "titleFontSize": 12, "titleFontFamily": "Segoe UI" }], "valueAxis": [{ "show": true, "fontSize": 14, "labelColor": { "solid": { "color": "#063d73"}}, "gridlineShow": true, "gridlineColor": { "solid": { "color": "#063d73"}}, "gridlineThickness": 2, "gridlineStyle": "dashed" }] ,"title": [{ "show": true, "position": "Top", "showTitle": true, "titleText": "por", "labelColor": { "solid": { "color": "#000000"}}, "fontFamily": "Tahoma", "fontSize": 10 }] } } ,"card": { "*": { "labels": [{ "color": { "solid": { "color": "#063d73"}}, "fontSize": 14 }], "categoryLabels": [{ "show": true, "color": { "solid": { "color": "#063d73"}}, "fontSize": 14 }], "wordWrap": [{ "show": true }] } } ,"basicShape": { "*": { "line": [{ "lineColor": { "solid": { "color": "#063d73"}}, "transparency": 0, "weight": 2, "roundEdge": 0 }], "border": [{ "show": false, "color": { "solid": { "color": "#063d73" } } }] , "background": [{ "show": false, "color": { "solid": { "color": "#063d73" } } }] , "fill": [{ "show": true, "fillColor": { "solid": { "color": "#c5c5c5"}}, "transparency": 0 }] } } ,"lineChart": { "*": { "general": [{ "responsive": true }], "dataPoint":["#6F63a7","#F283AF"], "categoryAxis": [{ "show": true, "axisType": "categorical", "labelColor": { "solid": { "color": "#063d73"}}, "fontSize": 14, "titleColor": { "solid": { "color": "#063d73"}} }], "valueAxis": [{ "show": true, "axisType": "categorical", "labelColor": { "solid": { "color": "#063d73"}}, "gridlineShow": true, "gridlineColor": { "solid": { "color": "#063d73"}}, "gridlineThickness": 1, "gridlineStyle": "dashed", "color": { "solid": { "color": "#063d73"}} }] } } , "kpi": { "*": { "indicator": [{ "indicatorDisplayUnits": "Auto", "indicatorPrecision": 1 }], "trendline": [{ "show": true }], "goals": [{ "showGoal": true, "showDistance": true }], "background": [{ "show": true, "showDistance": true, "transparency": 0 }], "status": [{ "direction": "Negative", "goodColor": { "solid": { "color": "#01B8AA"}}, "neutralColor": { "solid": { "color": "#FFA500"}}, "badColor": { "solid": { "color": "#f44542"}} }] } } ,"slicer": { "*":{ "header": [{ "show": false, "fontColor": { "solid": { "color": "#063d73"}}, "background": { "solid": { "color": ""}}, "outline": "Bottom only", "textSize": 10, "fontFamily": "Tahoma" }], "items": [{ "fontColor": { "solid": { "color": "#063d73"}}, "textSize": 10, "background": { "solid": { "color": ""}}, "fontFamily": "Tahoma" }], "title": [{ "show": true, "fontColor": { "solid": { "color": "#FFFFFF"}}, "background": { "solid": { "color": "#063d73"}}, "textSize": 10, "fontFamily": "Tahoma" }] } } } }
Hi @po,
It seems something is wrong. I have reported this issue to the Product Team: CRI 87158107. I will update here what the cause of this issue is.
Best Regards,
Dale
Thanks for update.
Hi,
Just to let you know managed to get the Totals to work on pivottable with json using below
,"total": [{
"fontColor": { "solid": { "color": "#ffffff"}},
"backColor": { "solid": { "color": "#063d73"}},
"outline": "Frame",
"fontSize": 10
}]
I have also tried this but its not working, Can anyone please tell me how to solve this error.
I'm unsure if it's quite the answer you need; however, using the below worked for me for the total. Hopefully this helps!
"rowTotal": [ {
"fontColor": { "solid": { "color": "#ffffff"}},
"backColor": { "solid": { "color": "#063d73"}},
"applyToHeaders": true
} ]