Forum Discussion

JosephJClark's avatar
JosephJClark
Regular Visitor
5 months ago
Solved

Theme Validation Error

Custom Themes that are currently working on all our client files cannot be Saved and used on other new .pbix files. I get the following error message: Validation error at /visualStyles/*/*/columnFo...
  • GeraldGEmerick's avatar
    5 months ago

    JosephJClark They update the specification for Power BI theme files from time to time. Try removing any dataBars entry in the file.

  • Ritaf1983's avatar
    5 months ago

    Hi JosephJClark 

    The error occurs because Data Bars (dataBars) and Column Formatting (columnFormatting) are properties specific to certain visual types and cannot be defined under a global wildcard (*) in the Power BI Theme JSON schema.

    To resolve this, you need to locate the visualStyles section in your JSON file and move the columnFormatting definitions from the generic wildcard section to specific visual types that support them, such as tableEx or pivotTable. Power BI's validation engine no longer accepts these properties when they are applied globally across all visual types.

    Corrected JSON Structure Example:

    Instead of using:
    "visualStyles": { "*": { "*": { "columnFormatting": [...] } } }

    You should use:

    JSON
    "visualStyles": {
    "tableEx": {
    "*": {
    "columnFormatting": [
    {
    "dataBars": {
    "show": true
    // additional properties
    }
    }
    ]
    }
    },
    "pivotTable": {
    "*": {
    "columnFormatting": [...]
    }
    }
    }
    If you do not strictly need global default Data Bars, the quickest fix is to remove the columnFormatting block entirely from the wildcard section. Once you've targeted specific visuals or removed the global reference, the theme will pass validation and allow you to save your .pbix files.

     

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly