Forum Discussion

2B's avatar
2B
Regular Visitor
7 months ago
Solved

Error importing theme immediately after exporting it from another report

Hi,

 

version 2.149.1429.0 64-bit (November 2025)

 

I've got a report open with a custom theme. It's all up to date, no errors, and I've done the "update the base theme" option that pops up.

 

I export this theme as a JSON, and immediately import it into another open PBIX, and I'm presented with this:

 

Is this a known bug? How can it be that if I directly export from a pbix and import that file into another pbix it's somehow incompatible? 

I've had a look and I can't find this exact issue elsewhere on here. To restate: I haven't touched or modified the json in any way. It is exactly as exported from PowerBI.

  • Microsoft’s schema documentation says that the JSON schema is “mostly additive” (Report theme JSON schema) and evolves over time, while older reports may still contain legacy property shapes. This implies that Power BI keeps backward-compatible structures internally so existing reports render correctly even if they don’t match the latest schema, but when you export a theme, Power BI writes out the theme exactly as stored in the PBIX, even if some properties are deprecated. Other user also reported that exported themes often include older structures like solid.color objects, which fail validation on re-import. if you see this below

    Solved: Unable to import theme - Microsoft Fabric Community 

     

6 Replies

  • Hii 2B 

     

    This error is caused by theme JSON validation, where the exported file contains a visualStyles rule under wildcarded visual types that doesn’t match the current theme schema specifically the color.solid block is being read as invalid because solid must be an object that contains a required color property (not just a value), and wildcard targeting can also fail for some properties. The practical fix is to update Power BI Desktop to the latest build and re-export, or edit/remove the offending visualStyles entry so it follows the schema format like "...\"color\": { \"solid\": { \"color\": \"#RRGGBB\" } }" (or delete that visualStyles section and import again).

    folow below link :-

    https://github.com/microsoft/powerbi-desktop-samples/blob/main/Report%20Theme%20JSON%20Schema/README.md? 

    • 2B's avatar
      2B
      Regular Visitor

      "update Power BI Desktop to the latest build"

       

      I'm not sure what you mean - as best I can tell I'm on the latest version? If I look on the MS website for the latest download it's the same as what I've got (2.149.1429.0)

       

  • You Power BI is already the latest built. One of the quick ways you can do is to share a small snippet from your exported theme (the part with /visualStyles/.../color that fails) with one AI agent and have it map to the 2.149 schema and see what caused the failures. 
    • 2B's avatar
      2B
      Regular Visitor

      I've found the failure. My question is why is PBI exporting JSON files that aren't compatible with PBI? Is this a known error? How would I know if it was? 

      • MasonMA's avatar
        MasonMA
        Super User

        Microsoft’s schema documentation says that the JSON schema is “mostly additive” (Report theme JSON schema) and evolves over time, while older reports may still contain legacy property shapes. This implies that Power BI keeps backward-compatible structures internally so existing reports render correctly even if they don’t match the latest schema, but when you export a theme, Power BI writes out the theme exactly as stored in the PBIX, even if some properties are deprecated. Other user also reported that exported themes often include older structures like solid.color objects, which fail validation on re-import. if you see this below

        Solved: Unable to import theme - Microsoft Fabric Community 

         

  • Might happen if you have custom visuals in your report which you export the JSON file. If your new pbix. file does not contain those custom visuals it could break the code.