Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
kelseyp
Advocate I

@v-xiaoyan-msft  my Power BI version:

kelseyp_0-1676852950739.png

 

KaroCka
Regular Visitor

@LauraWalczak 

 

It works! Thank you. It's not very helpful that you can't tell which url represends which icon, but it works so I stop complaining. 😊

 

Gazzer
Resolver II

The schema being validated does not appear to match the actual schema required.

For example, choosing which style of slicer you want is in "General" in the validation, but is now in the "Visual" tab for formatting. Plus, the validation will only accept one of two options (0 or 1) but there are three options available. This means you can only choose Vertical List or Tile, you cannot set Dropdown as the default type.

 

I'm using 2.114.664.0 February 2023

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

Hi @kelseyp ,

 

Please ensure the .json file is constructed correctly by referring the following link: Use report themes in Power BI Desktop - Power BI | Microsoft Learn and at the first time when you import the file it will not apply to the existing visuals , you have to use the 'revert to default' option refer link: Power bi .json Custom Theme - Revert visuals to default · Issue #2230 · MicrosoftDocs/powerbi-docs ·....
 
Best regards.
Community Support Team_ Caitlyn
blublood
Regular Visitor

@v-xiaoyan-msft - 

 

To clarify your advice:

 

AmyJessica02
Helper I

Thank you @LauraWalczak 

Jperez2k8
Frequent Visitor

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

I can confirm the same .json theme file worked perfectly before the February update

Anonymous
Not applicable

@v-xiaoyan-msft  unfortunately it doesn't help.
Still error message:  '#/icons must be array (type; matching schema #/properties/icons/type)'

Please solve this we need the icons to get work for our embedded (to customers) product!

 

Thank you!

odiallo
Regular Visitor

@DavidP and @KaroCka or anyone who resolved those issues. Could you please provide samples scripts and explain how you resolved them. Thank you

KaroCka
Regular Visitor

Hi @odiallo

 

I only had a problem with slicer mode Dropdown and icons didn't upload with description and the name.

 

Therefore I've just simply removed those details from my file 

 

before:

"icons": {
"GreenDash": {"description": "Green Dash", "url": "data&colon;image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15'> <rect x='0.5' y='5.5' fill='%2384C28A' width='14' height='4'/> <path fill='%23449E44' d='M0,5v5h15V5H0z M14,9.001H1V6h13V9.001z'/> </svg>"}

 

after:

 "icons": 
{
"url": "data&colon;image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15'> <rect x='0.5' y='5.5' fill='%2384C28A' width='14' height='4'/> <path fill='%23449E44' d='M0,5v5h15V5H0z M14,9.001H1V6h13V9.001z'/> </svg>"
}

 

I recommend using the following theme generator, it  gives a wide range of properities. It's been recently updated inline with the latest pbi changes.

 

https://themegenerator.point-gmbh.com/en/visuals/Global%20Level

I also use the following butyfier to check if my code is correct

 

https://jsonformatter.org/ 

 

Hope it helps.