cancel
Showing results for 
Search instead for 
Did you mean: 

Theme saved in Power BI can't be imported back due to validation

Hi,

 

Power BI desktop is updated today and our custom themes are not working anymore. Even when we tried to save the custom from Power BI, it can't be imported back:

 

kelseyp_0-1676502671338.png

 

This is the error:

 

 

#/visualStyles/barChart/*/legend/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/barChart/*/categoryAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/barChart/*/categoryAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/barChart/*/valueAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/barChart/*/valueAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/barChart/*/labels/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/columnChart/*/legend/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/columnChart/*/categoryAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/columnChart/*/categoryAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/columnChart/*/valueAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/columnChart/*/valueAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/columnChart/*/labels/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/clusteredBarChart/*/legend/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/clusteredBarChart/*/categoryAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/clusteredBarChart/*/categoryAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/clusteredBarChart/*/valueAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/clusteredBarChart/*/valueAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/clusteredBarChart/*/labels/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/clusteredColumnChart/*/legend/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/clusteredColumnChart/*/categoryAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/clusteredColumnChart/*/categoryAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/clusteredColumnChart/*/valueAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/clusteredColumnChart/*/valueAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/clusteredColumnChart/*/labels/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/hundredPercentStackedBarChart/*/legend/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/hundredPercentStackedBarChart/*/categoryAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/hundredPercentStackedBarChart/*/categoryAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/hundredPercentStackedBarChart/*/valueAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/hundredPercentStackedBarChart/*/valueAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/hundredPercentStackedBarChart/*/labels/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/hundredPercentStackedColumnChart/*/legend/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/hundredPercentStackedColumnChart/*/categoryAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/hundredPercentStackedColumnChart/*/categoryAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/hundredPercentStackedColumnChart/*/valueAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/hundredPercentStackedColumnChart/*/valueAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/hundredPercentStackedColumnChart/*/labels/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineChart/*/legend/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineChart/*/categoryAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineChart/*/categoryAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineChart/*/valueAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineChart/*/valueAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineChart/*/labels/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/areaChart/*/legend/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/areaChart/*/categoryAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/areaChart/*/categoryAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/areaChart/*/valueAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/areaChart/*/valueAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/areaChart/*/labels/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/stackedAreaChart/*/legend/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/stackedAreaChart/*/categoryAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/stackedAreaChart/*/categoryAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/stackedAreaChart/*/valueAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/stackedAreaChart/*/valueAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/stackedAreaChart/*/labels/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineStackedColumnComboChart/*/legend/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineStackedColumnComboChart/*/categoryAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineStackedColumnComboChart/*/categoryAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineStackedColumnComboChart/*/valueAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineStackedColumnComboChart/*/valueAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineStackedColumnComboChart/*/valueAxis/0/secFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineStackedColumnComboChart/*/valueAxis/0/secTitleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineStackedColumnComboChart/*/labels/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineClusteredColumnComboChart/*/legend/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineClusteredColumnComboChart/*/categoryAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineClusteredColumnComboChart/*/categoryAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineClusteredColumnComboChart/*/valueAxis/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineClusteredColumnComboChart/*/valueAxis/0/titleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineClusteredColumnComboChart/*/valueAxis/0/secFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineClusteredColumnComboChart/*/valueAxis/0/secTitleFontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/lineClusteredColumnComboChart/*/labels/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/visualStyles/kpi/*/title/0/fontSize must be number (type; matching schema #/definitions/fontSize/type)
#/icons must be array (type; matching schema #/properties/icons/type)

 

 

Could this please be looked at. Thank you.

Status: Accepted

Hi all,

 

We have reported this issue and submitted it to the product team.
They have been aware of the issue and the engineers will do their best to resolve it. I will update here if there is any progress, so please be patient. 

 

Best regards.
Community Support Team_ Caitlyn

 

Comments
KaroCka
Regular Visitor

I've got the same issue since yesterday I can't use my theme due to the following error:

 

#/icons must be array (type; matching schema #/properties/icons/type)

 

David_Joehren
Regular Visitor

Hi @kelseyp,

 

I encoutered the same issue. I could fix all the mentioned issues within the json file, but in the end PowerBI told me that something is wrong with the name, colors or some global setting and couldn't import the theme at all. 

 

Unfortunately, there is now a validation script in place with the new February update:

https://powerbi.microsoft.com/en-us/blog/power-bi-february-2023-feature-summary/#post-22137-_Toc1269... (see Report theme validation on custom theme import). It is mentioned though that there should be a tool published as well to keep the custom jsons themes up-to-date ("We will also be publishing the schema Power BI uses to check your theme file in a public location, updating it automatically whenever we change it in Power BI so that you can ensure your theme files are always current"). 

 

I couldn't find any further information on that tool - so I will be stuck with not knowing what is wrong with my file. Hopefully there will be some information within the next weeks.

 

Sorry I couldn't directly help but at least explain what happend.

David_Joehren
Regular Visitor

Hi @kelseyp,

 

I manually validated every setting in my JSON file and the only one that made issues, in the end, was the KPI settings. I deleted it and it was fine. So my suggestion to you is, to fix your JSON file the given error messages, for example, check if the font size is everywhere a number, and if it still doesn't work, add setting by setting ti find the troubling section.

KaroCka
Regular Visitor

@David_Joehren 

I've managed to get rid off most of errors the last one are custom icons, do you have any suggestion on how to fix it?

 

This is how I used to add custom icons:

 

"icons": {
"01ArrowGreenUp": {"description": "Arrow Green Up", "url": "paste url"}

}

 

#/icons must be array (type; matching schema #/properties/icons/type)

Thanks

blublood
Regular Visitor

@KaroCka - Adding a vote that I was getting the #/icons error.  Since I am not using icons, I could delete the line, and it now works for my files.  However, other members of the dev team are still unable to apply the edited json.

WG-PBI
Frequent Visitor

Voted, I am having same issue since Feb update - just want to be able to use custom icons again...

Alma7
Regular Visitor

Same error for us with icons... Can someone help?

 

#/icons must be array (type; matching schema #/properties/icons/type)

 

v-xiaoyan-msft
Community Support
Status changed to: Investigating

Hi,

 

Could you please provide us with your version of Power BI Desktop and your Power BI Cluster in order  to investigate further.

 

Best regards.
Community Support Team_ Caitlyn

 

blublood
Regular Visitor

Version: 2.114.664.0 64-bit (February 2023)

LauraWalczak
Regular Visitor

I was able to solve the same icon error with additional square brackets and deleting descrption and names. 
Here is sample code, which worked for me:

{
"name": "Blue",
"icons": [

{"url": ""},
{"url": ""}
]
}