A theme in Power BI refers to the appearance code that our report/dashboard follows. A theme in Power BI includes color scheme of visuals & background, text size, font, text orientation etc. One of the dictionary definitions of themes is “an idea that is concerned with art or literature”. As a BI tool, Power BI offers variety of in-built themes as well as numerous options from which a user can customize the theme. There are two ways of customizing theme, one is by doing it in Power BI Desktop itself and other is by creating a theme in JSON file. In this blog, we are going see how we can create our own color theme by importing the resultant JSON file into Power BI desktop.
Step 1: Creating Theme’s JSON file
There are two ways to create a JSON file, one is creating manually and other by using an online theme generator. I would recommend you to go with online theme generator.
- Creating Theme Manually: Below is the format of the JSON file.
{
“name”: “My Theme”,
“visualStyles”: {
“barChart”: {
“*”: {
“general”: [{
“responsive”: true
}],
“legend”: [{
“show”: true,
“position”: “Top”,
“showTitle”: true,
“titleText”: “”,
“labelColor”: { “solid”: { “color”: “#01B9AA”}},
“fontFamily”: “Courier New”,
“fontSize”: 10
}],
“valueAxis”: [{
“show”: true,
“axisScale”: “Linear”,
“labelColor”: { “solid”: { “color”: “#933”}},
“fontSize”: 14,
“fontFamily”: “Courier New”,
“labelDisplayUnits”: “0”,
“labelPrecision”: “Auto”,
“showAxisTitle”: true,
“axisStyle”: “showTitleOnly”,
“titleColor”: { “solid”: { “color”: “333”}},
“titleText”: “asdf”,
“titleFontSize”: 12,
“titleFontFamily”: “Courier New”,
“gridlineShow”: true,
“gridlineColor”: { “solid”: { “color”: “#eee”}},
“gridlineThickness”: 2,
“gridlineStyle”: “dashed”
}],
“dataColors”: [“#D16349”, “#CCB400”, “#8C7B70”, “#8FB08C”, “#D19049”, “#D1A649”, “#81CC00”, “#8C9DAE”, “#8C8870”, “#8CB09A”, “#CFD149”],
“labels”: [{
“show”: true,
“color”: { “solid”: { “color”: “#fff”}},
“labelDisplayUnits”: “0”,
“fontSize”: 11,
“fontFamily”: “Courier New”,
“enableBackground”: true,
“backgroundTransparency”: 30
}],
“plotArea”: [{
“transparency”: 20
}]
}}}}
You can just copy and paste this code in any of the text editor & edit to create the theme of your choice.
- Generating Theme Online: This is super simple way of creating a custom theme for your Power BI reports using Tips Custome Theme Generator.
Create your own color palette by adding color of your choice.
Add your values
After entering your preferred values, you can download the theme as JSON file by clicking on Download Theme button at the bottom. Now, we have our theme in a JSON file.
Step 2: Importing JSON in Power BI Desktop
In Power BI Desktop, go to View tab on the ribbon and click on the dropdown in Theme section.
Now, click on “Browse for themes” option & select your theme’s JSON file.
After your successful import, you’ll get the prompt below.
This is all about, how to create and import a custom theme in Power BI Financial Dashboard. I hope this blog gives you the information needed.
Gaurav Lakhotia
Data Analyst
Addend Analytics