Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I'm in the process of building a theme file in the JSON format. I was testing setting the "Background" colour found under the "Cards" menu within this JSON file. Changing the setting in the schema has no effect. In my examples i've used an obvious colour just to make it clear when it works.
Making a manual change to the setting and saving the report into the PBIP format, i can see in the report.json file that this visual does indeed use the same setting that i'm trying to set in my theme file.
The setting in question:
Part of my theme file that matters:
"cardVisual":{
"*":{
"fillCustom":[{
"fillColor": {
"solid": {
"color": "#A42900"
}
},
"show": true
}]
}
}
Extract from the Report.Json file for the visual i used for testing where i manually set the background as the colour #A42900
"config": "{\"name\":\"715288314fa7f4280917\",\"layouts\":[{\"id\":0,\"position\":{\"x\":123.8048780487805,\"y\":107.1219512195122,\"z\":13000,\"width\":191.41463414634148,\"height\":93.07317073170732,\"tabOrder\":16000}}],\"singleVisual\":{\"visualType\":\"cardVisual\",\"projections\":{\"Data\":[{\"queryRef\":\"MeasuresTable.FS Variance Goal\"}]},\"prototypeQuery\":{\"Version\":2,\"From\":[{\"Name\":\"m\",\"Entity\":\"MeasuresTable\",\"Type\":0}],\"Select\":[{\"Measure\":{\"Expression\":{\"SourceRef\":{\"Source\":\"m\"}},\"Property\":\"FS Variance Goal\"},\"Name\":\"MeasuresTable.FS Variance Goal\",\"NativeReferenceName\":\"FS Variance Goal\"}],\"OrderBy\":[{\"Direction\":2,\"Expression\":{\"Measure\":{\"Expression\":{\"SourceRef\":{\"Source\":\"m\"}},\"Property\":\"FS Variance Goal\"}}}]},\"drillFilterOtherVisuals\":true,\"hasDefaultSort\":true,\"objects\":{\"fillCustom\":[{\"properties\":{\"fillColor\":{\"solid\":{\"color\":{\"expr\":{\"Literal\":{\"Value\":\"'#A42900'\"}}}}}},\"selector\":{\"id\":\"default\"}}]},\"vcObjects\":{\"visualTooltip\":[{\"properties\":{\"transparency\":{\"expr\":{\"Literal\":{\"Value\":\"0D\"}}}}}],\"visualHeader\":[{\"properties\":{\"transparency\":{\"expr\":{\"Literal\":{\"Value\":\"0D\"}}}}}],\"visualHeaderTooltip\":[{\"properties\":{\"transparency\":{\"expr\":{\"Literal\":{\"Value\":\"0D\"}}}}}]}}}",
"filters": "[]",
"height": 93.07,
"width": 191.41,
"x": 123.80,
"y": 107.12,
"z": 13000.00
As you can see, Power BI assigns the setting to \"fillCustom\":[{\"properties\":{\"fillColor\":{\"solid\":{\"color\":{\"expr\":{\"Literal\":{\"Value\":\"'#A42900'\"} which matches my theme file. Importing the theme file has no effect on this setting.
To head off you most obvious question, the use of 'Reset to default' has been used before loading the theme file to ensure the setting is visible.
You will notice in my theme file i've added the "show" as true. Turning that to false works as intended, showing that the file is indeed setting the correct settings area.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.