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.

Reply
Rut
Frequent Visitor

Error Importing Theme File in Power BI

I have cretaed a theme based on our company's corporate branding, however if I add the font modification for visuals it stops working and gets me and error message when importing it. 

JSON script is below, and it does work if I remove the Font modification part 

 

{"name":"Company Theme",
"tableAccent":"#000000",
"dataColors":["#000000","#ffed00","#00c9ff","#64ff00","#666666","#d9d9d9","#ffed15","#666669","#d9d9d3","#64ff15"],
"visualStyles":{"*":
                          {"*":
                                {"*":[{
                                       "fontSize":10,
                                       "fontFamily":"Arial",
                                       "color":{"solid":{"color":"#000000"}}}]}}}}

1 ACCEPTED SOLUTION
Rut
Frequent Visitor

@Anonymous  Hi, in your code Color code "#A9EOEA" is invalid 🙂 it should either be zero instead of O ("#A9E0EA") or a different Code. If you replace O by zero in this color it improts successfully, so this would be the correct code:

 

{
"name": "Theme1",
"dataColors": ["#003B64", "#FFF200", "#FFD500", "#A9E0EA", "#231F20", "#49494A", "#737474", "#9A9B9B", "#C3C4C4", "#E7E7E7", "#FFFFFF"],
"background":"#FFFFFF",
"foreground": "#A9E0EA",
"tableAccent": "#FFD500"
}

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Sorry, no solution but I am getting the same error with this code: 

{
"name": "Theme1",
"dataColors": ["#003B64", "#FFF200", "#FFD500", "#A9EOEA", "#231F20", "#49494A", "#737474", "#9A9B9B", "#C3C4C4", "#E7E7E7", "#FFFFFF"],
"background":"#FFFFFF",
"foreground": "#A9EOEA",
"tableAccent": "#FFD500"
}

I can't seem to find any problems with the code. Thoughts?

Rut
Frequent Visitor

@Anonymous  Hi, in your code Color code "#A9EOEA" is invalid 🙂 it should either be zero instead of O ("#A9E0EA") or a different Code. If you replace O by zero in this color it improts successfully, so this would be the correct code:

 

{
"name": "Theme1",
"dataColors": ["#003B64", "#FFF200", "#FFD500", "#A9E0EA", "#231F20", "#49494A", "#737474", "#9A9B9B", "#C3C4C4", "#E7E7E7", "#FFFFFF"],
"background":"#FFFFFF",
"foreground": "#A9E0EA",
"tableAccent": "#FFD500"
}

v-huizhn-msft
Employee
Employee

Hi @Rut,

Have you imported the file correctly? Please share the detailed error messsage for further analysis?

Best Regards,
Angelia

I go to Switch Theme -> Import theme and get this error: 

 

PrtScr capture_4.jpg

The same file is importing sucessfully if I remove the font modification part.

Hi @Rut,

Congratulations, you can import the file successfully by removing the font modification part. You find solution by yourself. Please mark the your reply as answer, so more people will benefit from here.

Thanks,
Angelia

@v-huizhn-msft  This doesn't solve my issue. I need font modification for the template to comply with my company standards. Is it possible that this font modification is not currently supported in Power Bi? 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.