Forum Discussion
Anonymous
2 years agoNot applicable
Power Bi Json Theme - Pivot Table Row Subtotal Formatting not working
Hi, I am creating a json Theme file for my company and I am stuck on the matrix table. It just doesnt take the inputs for row subtotals. Here's the code: {
"name": "Test",
"pivotTabl...
- Anonymous2 years ago
Ok, solved it myself after trying different stuff. I had to go to the subtotals section and define font for rowsubtotals and columnsubtotals separately., like so:
"rowSubtotals": true, "fontFamilyrowSubtotals": "Calibri", "fontSizerowSubtotals": 10, "columnSubtotals": true, "fontFamilycolumnSubtotals": "Calibri", "fontSizecolumnSubtotals": 10This is the whole solution:
{ "name": "MatrixTemplate", "visualStyles": { "pivotTable": { "*": { "stylePreset":[{ "name":"Default" }], "grid": [{ "gridVertical": false, "gridVerticalColor": { "solid": { "color": "#F4F4F4"}}, "gridVerticalWeight": 2, "gridHorizontal": false, "gridHorizontalColor": { "solid": { "color": "#F4F4F4"}}, "gridHorizontalWeight": 2, "rowPadding": 4, "outlineColor": { "solid": { "color": "#F4F4F4"}}, "outlineWeight": 2, "textSize": 10, "imageHeight": 100 }], "columnHeaders": [{ "fontColor": { "solid": { "color": "#ffffff"}}, "backColor": { "solid": { "color": "#142640"}}, "autoSizeColumnWidth": true, "fontFamily": "Calibri", "fontSize": 10, "bold": true, "alignment": "Left", "titleAlignment": "Left", "urlIcon": true, "wordWrap": true }], "rowHeaders": [{ "fontColor": { "solid": { "color": "#0e1622"}}, "backColor": { "solid": { "color": "#ffffff"}}, "outline": "Frame", "outlineColor": { "solid": { "color": "#142640"}}, "outlineWeight": 1, "stepped": true, "steppedLayoutIndentation": 12, "urlIcon": true, "wordWrap": true, "fontFamily": "Calibri", "fontSize": 10, "alignment": "Left", "showExpandCollapseButtons":true }], "values": [{ "fontColorPrimary": { "solid": { "color": "#0e1622"}}, "backColorPrimary": { "solid": { "color": "#ffffff"}}, "fontColorSecondary": { "solid": { "color": "#0e1622"}}, "backColorSecondary": { "solid": { "color": "#F4F4F4"}}, "bandedRowHeaders": true, "valuesOnRow": true, "outline": "Frame", "urlIcon": true, "wordWrap": true, "fontFamily": "Calibri", "fontSize": 10 }], "subTotals": [{ "rowSubtotals": true, "fontFamilyrowSubtotals": "Calibri", "fontSizerowSubtotals": 10, "columnSubtotals": true, "fontFamilycolumnSubtotals": "Calibri", "fontSizecolumnSubtotals": 10, "applyToHeaders": true, "perRowLevel": true, "perColumnLevel": true }] } } } }
Anonymous
2 years agoNot applicable
Ok, solved it myself after trying different stuff. I had to go to the subtotals section and define font for rowsubtotals and columnsubtotals separately., like so:
"rowSubtotals": true,
"fontFamilyrowSubtotals": "Calibri",
"fontSizerowSubtotals": 10,
"columnSubtotals": true,
"fontFamilycolumnSubtotals": "Calibri",
"fontSizecolumnSubtotals": 10
This is the whole solution:
{
"name": "MatrixTemplate",
"visualStyles": {
"pivotTable": {
"*": {
"stylePreset":[{
"name":"Default"
}],
"grid": [{
"gridVertical": false,
"gridVerticalColor": { "solid": { "color": "#F4F4F4"}},
"gridVerticalWeight": 2,
"gridHorizontal": false,
"gridHorizontalColor": { "solid": { "color": "#F4F4F4"}},
"gridHorizontalWeight": 2,
"rowPadding": 4,
"outlineColor": { "solid": { "color": "#F4F4F4"}},
"outlineWeight": 2,
"textSize": 10,
"imageHeight": 100
}],
"columnHeaders": [{
"fontColor": { "solid": { "color": "#ffffff"}},
"backColor": { "solid": { "color": "#142640"}},
"autoSizeColumnWidth": true,
"fontFamily": "Calibri",
"fontSize": 10,
"bold": true,
"alignment": "Left",
"titleAlignment": "Left",
"urlIcon": true,
"wordWrap": true
}],
"rowHeaders": [{
"fontColor": { "solid": { "color": "#0e1622"}},
"backColor": { "solid": { "color": "#ffffff"}},
"outline": "Frame",
"outlineColor": { "solid": { "color": "#142640"}},
"outlineWeight": 1,
"stepped": true,
"steppedLayoutIndentation": 12,
"urlIcon": true,
"wordWrap": true,
"fontFamily": "Calibri",
"fontSize": 10,
"alignment": "Left",
"showExpandCollapseButtons":true
}],
"values": [{
"fontColorPrimary": { "solid": { "color": "#0e1622"}},
"backColorPrimary": { "solid": { "color": "#ffffff"}},
"fontColorSecondary": { "solid": { "color": "#0e1622"}},
"backColorSecondary": { "solid": { "color": "#F4F4F4"}},
"bandedRowHeaders": true,
"valuesOnRow": true,
"outline": "Frame",
"urlIcon": true,
"wordWrap": true,
"fontFamily": "Calibri",
"fontSize": 10
}],
"subTotals": [{
"rowSubtotals": true,
"fontFamilyrowSubtotals": "Calibri",
"fontSizerowSubtotals": 10,
"columnSubtotals": true,
"fontFamilycolumnSubtotals": "Calibri",
"fontSizecolumnSubtotals": 10,
"applyToHeaders": true,
"perRowLevel": true,
"perColumnLevel": true
}]
}
}
}
}