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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ShoyaY
New Member

Power BI Desktop Theme Import Error: JSON Syntax Invalid or Invalid Top-Level Property

Problem Description: I am encountering a recurring “Theme file import error” in Power BI Desktop when attempting to import a custom theme JSON file. The error message indicates “JSON syntax is invalid, the required property ‘name’ is missing, an invalid color is used, or an invalid top-level property is specified.” This occurs specifically when including dataLabels or legend properties within the visualStyles section. Despite successful partial imports and confirmation of JSON syntax, combining these elements leads to a failure. Furthermore, the custom font (‘Noto Sans JP’) is not available in the dropdown lists for dataLabels or legend in the visual formatting pane, preventing manual application.

Power BI Desktop Version: 2.148.1477.0 64-bit (October 2025) OS: Windows 11 Pro 24H2

Custom Font Details:

  • Font Name: Noto Sans JP
  • Format: TTF
  • Installation: The font is correctly installed on Windows (using the “Install for all users” option) and functions normally in other applications like Microsoft Word and PowerPoint.

    Steps to Reproduce:

    1. Ensure the ‘Noto Sans JP’ font is installed on your system.
    2. Open Power BI Desktop and create a new report.
    3. Copy the following JSON code into a text editor and save it as failing_theme.json with ‘UTF-8 (BOM-less)’ encoding:
      json
      {
            "name": "Noto Sans JP Full Theme Test",
            "textClasses": {
              "callout": { "fontFace": "Noto Sans JP" },
              "title": { "fontFace": "Noto Sans JP" },
              "header": { "fontFace": "Noto Sans JP" },
              "label": { "fontFace": "Noto Sans JP" }
            },
            "visualStyles": {
              "*": {
                "*": {
                  "general": [
                    {
                      "fontFamily": "Noto Sans JP"
                    }
                  ],
                  "title": [
                    {
                      "fontFamily": "Noto Sans JP"
                    }
                  ],
                  "labels": [
                    {
                      "fontFamily": "Noto Sans JP"
                    }
                  ],
                  "categoryAxis": [
                    {
                      "fontFamily": "Noto Sans JP"
                    }
                  ],
                  "valueAxis": [
                    {
                      "fontFamily": "Noto Sans JP"
                    }
                  ],
                  "dataLabels": [ // Adding this property causes import failure
                    {
                      "fontFamily": "Noto Sans JP"
                    }
                  ],
                  "legend": [     // Adding this property also causes import failure
                    {
                      "fontFamily": "Noto Sans JP"
                    }
                  ]
                }
              }
            }
          }
      1. In Power BI Desktop, navigate to ‘Home’ tab > ‘Themes’ group > ‘Switch theme’ > ‘Browse for themes’.
      2. Select the failing_theme.json file created in step 3 and attempt to import it.

        Expected Behavior: The theme file should import successfully, applying ‘Noto Sans JP’ to all specified text elements (text boxes, chart titles, axis labels, data labels, legends, etc.). The font should also be available for manual selection in all relevant dropdowns within the visual formatting pane.

        Actual Behavior: An error popup titled “テーマ ファイルのインポート エラー” (Theme file import error) is displayed, with the message: “テーマ ファイルのインポート中に問題が発生しました。JSON 構文が無効であるか、必要なプロパティ “name” が欠落しているか、無効な色が使用されているか、無効な最上位プロパティが指定されています。” (A problem occurred while importing the theme file. The JSON syntax is invalid, the required property “name” is missing, an invalid color is used, or an invalid top-level property is specified.) (Screenshot attached)

        Additional Observations and Troubleshooting Steps Taken:

        • Initial Setup: The issue was initially encountered on an existing PC. Re-installing Power BI Desktop on a new, clean PC environment (with the specified version) was performed.
        • JSON Syntax & Encoding: Confirmed JSON syntax is valid (via online validators) and saved with ‘UTF-8 (BOM-less)’ encoding.
        • Partial Theme Imports (Successes):
          • A minimal JSON with only {"name": "ThemeName"} imports successfully.
          • A theme with only textClasses (e.g., callout, title, header, label with ‘Noto Sans JP’) imports successfully.
          • A theme with only visualStyles (e.g., general, title, labels, categoryAxis, valueAxis with ‘Noto Sans JP’, using the required array format) imports successfully.
          • A theme with only visualStyles for dataLabels (e.g., visualStyles -> * -> * -> dataLabels with ‘Noto Sans JP’) imports successfully.
          • A theme with only visualStyles for legend (e.g., visualStyles -> * -> * -> legend with ‘Noto Sans JP’) imports successfully.
          • A theme combining textClasses (as above) and the main visualStyles (e.g., general, title, labels, categoryAxis, valueAxis) also imports successfully.
          • Font Availability in UI:
            • ‘Noto Sans JP’ is visible and selectable in the font dropdown for general text boxes and for elements like axis titles/labels within the visual formatting pane. This confirms Power BI Desktop recognizes the font.
            • However, ‘Noto Sans JP’ is not listed in the font dropdown for dataLabels or legend within the visual formatting pane, preventing manual application for these specific elements.

              Conclusion/Hypothesis: Based on these observations, it strongly appears there is a bug in Power BI Desktop where:

              1. The theme parser fails to import a theme when dataLabels and/or legend properties are included in the visualStyles section, especially when combined with other sections, despite being syntactically correct. This leads to a misleading generic “Theme file import error” message.
              2. The custom font is not consistently available in all UI font dropdowns (specifically for dataLabels and legend), even when it is recognized in other contexts.

                This significantly hinders the ability to create fully consistent reports using custom fonts via theme files.

                Attachments:

                • Screenshot of the ‘Theme file import error’ popup (the image provided in Japanese).
                • The failing_theme.json file used in the reproduction steps.
1 ACCEPTED SOLUTION

Hi @ShoyaY,

Happy to hear that is you problem solved

So can you mark it as a solution please?

View solution in original post

6 REPLIES 6
Ahmed-Elfeel
Solution Sage
Solution Sage

Hi @ShoyaY,

It took me time to understand your issue....So this issue caused due to several factors:

  • Power BI has strict requirements for JSON theme file structure
  • Some custom fonts may not be available in Power BI
  • dataLabels and legend may need to be placed under specific visual types rather than the generic "*" section

So try this approaches and tell me if it works:

First Approach :

  • Try this modified JSON structure that avoids using potentially unsupported properties in generic sections:
{
  "name": "Noto Sans JP Fixed Theme",
  "textClasses": {
    "callout": { "fontFace": "Noto Sans JP" },
    "title": { "fontFace": "Noto Sans JP" },
    "header": { "fontFace": "Noto Sans JP" },
    "label": { "fontFace": "Noto Sans JP" }
  },
  "visualStyles": {
    "*": {
      "*": {
        "*": [{
          "fontFamily": "Noto Sans JP",
          "fontSize": 10
        }],
        "title": [{
          "fontFamily": "Noto Sans JP",
          "fontSize": 12
        }],
        "labels": [{
          "fontFamily": "Noto Sans JP",
          "show": true
        }]
      }
    },
    "columnChart": {
      "*": {
        "dataLabels": [{
          "fontFamily": "Noto Sans JP"
        }],
        "legend": [{
          "fontFamily": "Noto Sans JP"
        }]
      }
    },
    "barChart": {
      "*": {
        "dataLabels": [{
          "fontFamily": "Noto Sans JP"
        }],
        "legend": [{
          "fontFamily": "Noto Sans JP"
        }]
      }
    },
    "lineChart": {
      "*": {
        "dataLabels": [{
          "fontFamily": "Noto Sans JP"
        }],
        "legend": [{
          "fontFamily": "Noto Sans JP"
        }]
      }
    }
  }
}

 

Second Approach :

  • If the above does not work try adding single quotes around the font name:
"textClasses": {
  "callout": { "fontFace": "'Noto Sans JP'" },
  "title": { "fontFace": "'Noto Sans JP'" },
  "header": { "fontFace": "'Noto Sans JP'" },
  "label": { "fontFace": "'Noto Sans JP'" }
}

 

Bonus Approach :

  1. First apply a base theme without dataLabels and legend

  2. Use Format Painter to standardize formats

  3. Manually set fonts for elements that can not be controlled via theme

Notes :

  • Some custom fonts may not be available in all contexts within Power BI (this is a known limitation)
  • Consider downgrading to an older Power BI version (like December 2022 release) as a temporary workaround

  • Power BI themes do not override manually set formats
if this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.

Hi @Ahmed-Elfeel 

Thank you so much for your excellent suggestions and for helping me understand the issue!

I’m very happy to report that the JSON structure you provided (which places dataLabels and legend under specific visual types) successfully imported into Power BI Desktop! This is a significant breakthrough in applying my custom font.

Here’s what is now working correctly with the imported theme:

  • Text boxes: Font is ‘Noto Sans JP’.
  • Table visuals: Font is ‘Noto Sans JP’.
  • Bar chart (e.g., column chart): Y-axis values/labels (axis text) are ‘Noto Sans JP’.
  • Pie chart: Legend font is ‘Noto Sans JP’.

However, I am still facing challenges with specific elements, and I’d appreciate your further guidance:

  1. Pie Chart Data Labels: The numerical values, percentages, and category names displayed as data labels on the pie chart are still NOT changing to ‘Noto Sans JP’. I’ve tried including dataLabels properties for pieChart in the theme, but the font doesn’t apply to these specific text elements.
  2. Bar Chart Data Labels: Similarly, the numerical values displayed as data labels on the bar chart (on top of the bars) are also NOT changing to ‘Noto Sans JP’.

My goal is to have the ‘Noto Sans JP’ font applied to all text elements within my reports, including these data labels on pie and bar charts.

Could you please advise on how I might modify the JSON further to ensure the ‘Noto Sans JP’ font is applied to the data labels (numerical values, percentages, and category names) of pie charts and bar charts? Are there specific properties or additional settings required for these particular elements within the theme JSON?

Thank you again for your invaluable help!

Hi @ShoyaY,

Happy to hear this ☺️❤️

 

So the issue with pie chart and bar chart data labels you are facing is a common one, they often require more specific targeting in the JSON....So could you try this JSON structure that specifically targets data labels for pie charts and bar charts :

 

{
  "name": "Noto Sans JP Complete Theme",
  "textClasses": {
    "callout": { "fontFace": "Noto Sans JP" },
    "title": { "fontFace": "Noto Sans JP" },
    "header": { "fontFace": "Noto Sans JP" },
    "label": { "fontFace": "Noto Sans JP" }
  },
  "visualStyles": {
    "*": {
      "*": {
        "*": [{
          "fontFamily": "Noto Sans JP",
          "fontSize": 10
        }],
        "title": [{
          "fontFamily": "Noto Sans JP",
          "fontSize": 12
        }],
        "labels": [{
          "fontFamily": "Noto Sans JP",
          "show": true
        }]
      }
    },
    "columnChart": {
      "*": {
        "dataLabels": [{
          "fontFamily": "Noto Sans JP",
          "color": "#000000",
          "show": true
        }],
        "legend": [{
          "fontFamily": "Noto Sans JP"
        }]
      }
    },
    "barChart": {
      "*": {
        "dataLabels": [{
          "fontFamily": "Noto Sans JP",
          "color": "#000000",
          "show": true
        }],
        "legend": [{
          "fontFamily": "Noto Sans JP"
        }]
      }
    },
    "pieChart": {
      "*": {
        "dataLabels": [{
          "fontFamily": "Noto Sans JP",
          "color": "#000000",
          "show": true,
          "categoryLabel": {
            "fontFamily": "Noto Sans JP",
            "show": true
          },
          "value": {
            "fontFamily": "Noto Sans JP",
            "show": true
          },
          "percentage": {
            "fontFamily": "Noto Sans JP",
            "show": true
          }
        }],
        "legend": [{
          "fontFamily": "Noto Sans JP"
        }]
      }
    },
    "donutChart": {
      "*": {
        "dataLabels": [{
          "fontFamily": "Noto Sans JP",
          "color": "#000000",
          "show": true,
          "categoryLabel": {
            "fontFamily": "Noto Sans JP",
            "show": true
          },
          "value": {
            "fontFamily": "Noto Sans JP",
            "show": true
          },
          "percentage": {
            "fontFamily": "Noto Sans JP",
            "show": true
          }
        }]
      }
    }
  }
}

 

If the above JSON still does not work for data labels, try these additional approaches:

  1. Reset Visual Formatting First
    • Select your pie/bar chart

    • Go to Format paneData labels

    • Click Reset to default (if available)
    • Then reapply your theme

  2. If the theme still doesn't catch data labels, you can:

    • Apply the theme first

    • Then manually set data label fonts in the Format pane

    • Use Format Painter to copy these settings to other similar visuals

  3. Try this more explicit structure for pie charts:

"pieChart": {
  "*": {
    "dataLabels": [{
      "fontFamily": "Noto Sans JP",
      "show": true,
      "labelStyle": {
        "fontFamily": "Noto Sans JP"
      }
    }]
  }
}

 

Important Notes you should Know it:

  • Some data label properties might not be fully theme able due to Power BI limitations
  • If you previously manually formatted data labels the theme won't override them until you reset to default
  • Some visual types (especially custom visuals) may not respect all theme settings

Let me know how this works!😀❤️

if this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.

Hi @Ahmed-Elfeel ,

I wanted to provide an update and express my sincere gratitude for your invaluable help!

All the issues are now resolved, and my custom font (‘Noto Sans JP’) is successfully applied to all text elements in my Power BI reports, including data labels and legends!

The key to the final solution was combining your modified JSON structure (which places dataLabels and legend under specific visual types) with an additional step:

  1. I imported the theme JSON file you provided (or a slightly extended version of it, including pieChart settings). This part worked perfectly, and the theme imported without any errors.
  2. For any text elements that did not immediately update to ‘Noto Sans JP’ after importing the theme (e.g., data labels on pie/bar charts), I found that using the “Reset to default” option in the visual formatting pane for that specific element caused the ‘Noto Sans JP’ font to be applied correctly.

This confirms that the theme was indeed loaded with the correct font settings, but some existing visual elements needed to be explicitly reset to adhere to the new theme.

Now, all my text boxes, table visuals, bar chart axis values, pie chart legends, and most importantly, data labels on bar charts and pie charts are correctly displaying ‘Noto Sans JP’.

Thank you again so much for your persistent support and excellent guidance. Your insights on placing dataLabels and legend under specific visual types were crucial, and the combined approach (import + reset to default) has finally led to a complete solution!

I would be happy to mark your initial helpful post as the solution.

Hi @ShoyaY,

Mark the reply that has solution not my request solution reply to help other peopleto find it *You can mark more than one reply) i hope you understand

Hi @ShoyaY,

Happy to hear that is you problem solved

So can you mark it as a solution please?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.