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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
agwalsh1812
Helper I
Helper I

Have created a JSON file from a text file but PowerBI rejecting it

I have generated this code based on a (dead) artist's work - Harry Clarke. I copied it into a text file and saved this file as a JSON one to use as a theme in PowerBI. However I got a message from PowerBI saying "Error importing theme file...The JSON syntaz was invalid, missing required proper "name", used invalid colors, or provided invalid top-level properties. ". What am I missing?

{
"name": "Harry Clarke",
"dataColors": [
"#3E4B52", // Deep Blue
"#844C44", // Maroon
"#968A46", // Olive Green
"#CB793A", // Burnt Orange
"#4D7D7A", // Teal
"#6D738C", // Smoky Purple
"#AA5C1C", // Rust Brown
"#BA9C48", // Golden Yellow
"#4C6D70", // Slate Blue
"#736C8E" // Lavender
],
"background": "#F4F2F0",
"foreground": "#3E4B52",
"tableAccent": "#968A46",
"visualStyles": {
"*": {
"*": {
"fontFamily": "'Segoe UI', 'Arial', sans-serif",
"fontSize": "11px"
}
},
"Title": {
"color": "#844C44",
"fontWeight": "bold",
"fontSize": "18px"
},
"Visual title": {
"color": "#3E4B52",
"fontWeight": "bold",
"fontSize": "14px"
},
"Grid": {
"gridVerticalStrokeWidth": 0.5,
"gridHorizontalStrokeWidth": 0.5,
"gridStroke": "#BA9C48"
},
"TextValue": {
"color": "#3E4B52",
"fontSize": "14px"
},
"Axis": {
"grid": {
"show": true,
"stroke": "#BA9C48",
"strokeWidth": 0.5
},
"title": {
"color": "#844C44",
"fontSize": "12px",
"fontWeight": "bold"
},
"labels": {
"color": "#3E4B52",
"fontSize": "11px"
}
},
"Legend": {
"title": {
"color": "#3E4B52",
"fontWeight": "bold",
"fontSize": "12px"
},
"label": {
"color": "#3E4B52",
"fontSize": "11px"
}
}
}
}

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Try without spaces

{ "name": "Harry Clarke", "dataColors": [ "#3E4B52", "#844C44", "#968A46", "#CB793A", "#4D7D7A", "#6D738C", "#AA5C1C", "#BA9C48", "#4C6D70", "#736C8E" ], "background": "#F4F2F0", "foreground": "#3E4B52", "tableAccent": "#968A46", "visualStyles": { "*": { "*": { "fontFamily": "'Segoe UI', 'Arial', sans-serif", "fontSize": "11px" } }, "Title": { "color": "#844C44", "fontWeight": "bold", "fontSize": "18px" }, "Visual title": { "color": "#3E4B52", "fontWeight": "bold", "fontSize": "14px" }, "Grid": { "gridVerticalStrokeWidth": 0.5, "gridHorizontalStrokeWidth": 0.5, "gridStroke": "#BA9C48" }, "TextValue": { "color": "#3E4B52", "fontSize": "14px" }, "Axis": { "grid": { "show": true, "stroke": "#BA9C48", "strokeWidth": 0.5 }, "title": { "color": "#844C44", "fontSize": "12px", "fontWeight": "bold" }, "labels": { "color": "#3E4B52", "fontSize": "11px" } }, "Legend": { "title": { "color": "#3E4B52", "fontWeight": "bold", "fontSize": "12px" }, "label": { "color": "#3E4B52", "fontSize": "11px" } } } }

View solution in original post

2 REPLIES 2
agwalsh1812
Helper I
Helper I

That worked beautifully - thank you. Why did the spaces make such a difference? Just so I know for future reference. 

amitchandak
Super User
Super User

Try without spaces

{ "name": "Harry Clarke", "dataColors": [ "#3E4B52", "#844C44", "#968A46", "#CB793A", "#4D7D7A", "#6D738C", "#AA5C1C", "#BA9C48", "#4C6D70", "#736C8E" ], "background": "#F4F2F0", "foreground": "#3E4B52", "tableAccent": "#968A46", "visualStyles": { "*": { "*": { "fontFamily": "'Segoe UI', 'Arial', sans-serif", "fontSize": "11px" } }, "Title": { "color": "#844C44", "fontWeight": "bold", "fontSize": "18px" }, "Visual title": { "color": "#3E4B52", "fontWeight": "bold", "fontSize": "14px" }, "Grid": { "gridVerticalStrokeWidth": 0.5, "gridHorizontalStrokeWidth": 0.5, "gridStroke": "#BA9C48" }, "TextValue": { "color": "#3E4B52", "fontSize": "14px" }, "Axis": { "grid": { "show": true, "stroke": "#BA9C48", "strokeWidth": 0.5 }, "title": { "color": "#844C44", "fontSize": "12px", "fontWeight": "bold" }, "labels": { "color": "#3E4B52", "fontSize": "11px" } }, "Legend": { "title": { "color": "#3E4B52", "fontWeight": "bold", "fontSize": "12px" }, "label": { "color": "#3E4B52", "fontSize": "11px" } } } }

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors