Power BI Report Themes

Introduction

Whenever I start with a new client one of the first things I do is ask for their Power BI Report Theme, and in case they don’t have one I’ll start developing one. The reason for this is that the easiest way to create cohesion across all your PBI reports is just by using a theme.

With Power BI report themes, you can apply design changes to your entire report, such as using corporate colors, changing fonts, or applying new default visual formatting. When you apply a report theme, all visuals in your report use the colors and formatting from your selected theme as their defaults.

Creating a Color palette

The first step in creating a color palette is creating a custom color palette for the reports.

  • The company you are working for has a defined color palette (regularly available with the marketing or web dev departments).
  • You can use the website/logo as a guideline to create a palette.

When you are using the website/logo as a guideline you can achieve this in the following way. You can install an add-on in your browser to recognize the colors used on a website. An example of this is ColorZilla.

Here you can see the specific e61 orange.

 

Image
Finding a Color

Picture 1: Finding a Color

The next step is to identify good complementary or contrasting colors to use alongside these. For this, I use the following website: https://coolors.co/

Here you can create your palette and give in your own colors to get started. In the end, we need to have 8 colors we can use for our color palette.

Image
Figure 2: Color Palette 1

Figure 2: Color Palette 1

The next step is verifying if a color palette does not give any issues for people with any type of color blindness.
On the following website, you can give in some colors to check how this looks for people with color blindness.
This is how it looks for my color palette above. We are mostly safe here with this color palette, I think for the most common types of color blindness these colors have enough differentiation.

Image
Figure 3: Comparing Colors

Figure 3: Comparing Colors

Creating a PBI theme

To start to use this color palette in your reports you first need to include this in a Power BI Theme. Creating a Power BI Theme is easy and can be done in multiple ways.

You can create a JSON file with the following structure.

Image
Figure 4: Basis Theme

Figure 4: Basis Theme

As you can see the file at the moment contains nothing more than the name of the theme and the color palette we made. But we can already start using this file in Power BI. To do that we need to import the file.

Image
Figure 5: Themes in PBI 1

Figure 5: Themes in PBI 1

Besides the colors a PBI theme also has some additional properties almost everyone is familiar with. These are all accessible from within PBI Desktop.

Image
Figure 6: Themes in PBI 2

Figure 6: Themes in PBI

Here you can choose to change a few things.

  • Names and colors

Here you can see the color palette you’ve chosen and you have the option to change the colors if you want. Besides this, you can also see the sentiment and divergent colors. Sentiment colors are used in KPI visuals and waterfall charts to indicate positive, negative and neutral. Divergent colors are used in conditional formatting to show where a data point falls within a range.

Here I made a change to which colors were used for the sentiment colors. 

Image
Figure 7: Themes in PBI

Figure 7: Themes in PBI

In the advanced tap, you can change some element colors.

To learn more about these structural colors you can consult Microsoft Documentation. In this case, I’m not going to make any adjustments.

  • Text

Of course, you can also choose which fonts Power BI uses. This can be applied to General, Title, Card and KPI’s as well as the tab header. Again, keep in line with what type of font the company is using. You can use fonts besides the default available in Power BI but this is not recommended. The reason why we don’t recommend this is that it doesn’t install the font for the report consumers. So if they don’t have this font installed it will revert to a default font. So just stick with the default fonts. I’ve adjusted the theme to use Tahoma for the text.

  • Visual

Here you can default a visual to a background, border, header, and tooltip.

  • Page

Here you can set up a Wallpaper and/or page background. This is limited to using color and not images.

  • Filter Pane

You can also change the color of the filter pane and the elements within it in the theme. I always recommend not including the filter pane in the final version of your report and hiding it for your end user. This can be done using the eye icon. The main reason why I advise this is that the user experience for the filter pane isn’t the greatest. It’s not located at the logical location and you can’t change this, its more advanced functionalities compared to a traditional slicer can confuse users and because it’s not always visible you can forget that you’ve filtered your report on something.

In case you made any changes to your theme don’t forget to hit apply. Afterwards, you can also save this adjusted theme.

Image
Figure 8: Themes in PBI

Figure 8: Themes in PBI

As you can see the changes applied that way are also saved to your JSON file.

{
    "name":"element61"
    ,"textClasses":
        {
            "label":
                {
                    "fontFace":"Tahoma"
                }, 
            "header":
                {
                    "fontFace": "Tahoma"
                }
            
        }
    ,"dataColors":
        [
            "#EB6E07"
            ,"#B2C9AB"
            ,"#E8DDB5"
            ,"#247BA0"
            ,"#780116"
            ,"#002A32"
            ,"#F9DC5C"
            ,"#C69DD2"
        ]
    ,"good": "#1AAB40"
    ,"neutral": "#D9B300"
    ,"bad":"#D63554"
}

Figure 9: Basis Theme 2

Advanced Options

You can go even further than these standard adjustments. You can decide how the standard Power BI visuals behave out of the box.

Do they need to have a title? Do you want to show gridlines? Or data labels? … Let’s look at an example. The following visual is built on top of AdventureWorks data and uses the theme we’ve worked on up until now. We get the following bar chart.

Image
Figure 10: Bar

Figure 10: Bar

I’ve made only some changes to our PBI theme and now my column chart looks like this.

Image
Figure 11: Bar 2

Figure 11: Bar 2

 

You can see I’ve added a visual style element for clustered column charts to my theme.

Here I’ve designated for example that for the data points (the columns) I wanted to use the green color ("#448822").

In your JSON you can specify all the visual elements and choose how you want to handle these in your reports by default. You can find some documentation on all these options at the following location.

{
    "name":"element61"
    ,"textClasses":
        {
            "label":
                {
                    "fontFace":"Tahoma"
                }, 
            "header":
                {
                    "fontFace": "Tahoma"
                }
            
        }
    ,"dataColors":
        [
            "#EB6E07"
            ,"#B2C9AB"
            ,"#E8DDB5"
            ,"#247BA0"
            ,"#780116"
            ,"#002A32"
            ,"#F9DC5C"
            ,"#C69DD2"
        ]
    ,"good": "#1AAB40"
    ,"neutral": "#D9B300"
    ,"bad":"#D63554"
    ,"visualStyles": {
		"clusteredColumnChart": {
			"*": {
				"general": [{
					"responsive": true,
					"keepLayerOrder": true
				}],
				"legend": [{
					"show": true,
					"position": "Top",
					"showTitle": true,
					"titleText": "",
					"labelColor": { "solid": { "color": "#01B8AA"}},
					"fontFamily": "Courier New",
					"fontSize": 10
				}],
				"categoryAxis": [{
					"show": true,
					"labelColor": { "solid": { "color": "#01B8AA"}},
					"fontSize": 14,
					"fontFamily": "Courier New",
					"preferredCategoryWidth": 30,
					"maxMarginFactor": 28,
					"innerPadding": 22,
					"concatenateLabels": true,
					"showAxisTitle": true,
					"axisStyle": "showTitleOnly",
					"titleColor": { "solid": { "color": "#01B8AA"}},
					"titleText": "asdf",
					"titleFontSize": 12,
					"titleFontFamily": "Segoe UI"
				}],
				"valueAxis": [{
					"show": true,
					"position": "Right",
					"axisScale": "Linear",
					"start": 0,
					"end": 10,
					"labelColor": { "solid": { "color": "#01B8AA"}},
					"fontSize": 14,
					"fontFamily": "Courier New",
					"labelDisplayUnits": "0",
					"labelPrecision": "Auto",
					"showAxisTitle": true,
					"axisStyle": "showTitleOnly",
					"color": { "solid": { "color": "01B8AA"}},
					"titleText": "asdf",
					"titleFontSize": 12,
					"titleFontFamily": "Courier New",
					"gridlineShow": true,
					"gridlineColor": { "solid": { "color": "#01B8AA"}},
					"gridlineThickness": 2,
					"gridlineStyle": "dashed"
				}],
				"dataPoint": [{
					"defaultColor": { "solid": { "color": "#448822"}}
				}],
				"labels": [{
					"show": true,
					"color": { "solid": { "color": "#EEEEEE"}},
					"labelDisplayUnits": "0",
					"labelPrecision": 1,
					"labelOrientation": "vertical",
					"labelPosition": "OutsideEnd",
					"fontSize": 11,
					"fontFamily": "Courier New",
					"enableBackground": true,
					"backgroundColor": { "solid": { "color": "#0928DD"}},
					"backgroundTransparency": 30
				}],		
				"plotArea": [{
					"transparency": 20
				}]
			}
		}
	}
}

 

Advanced Options - The Easy Way

But there is an easier way to create this type of advanced theme, and that is using the Power BI Theme Generator. With the Power BI theme generator, you can add your palette and indicate some properties per visual type.

As you can see below, I’ve chosen a line chart and, on the right, you get all the properties you can specify for this type of chart.

Image
Figure 12: Theme Generator

Figure 12: Theme Generator

After you’ve made all the changes you want you can download your theme, and this will give you the JSON with all the specifications you made for your theme and start using it within Power BI.

Image
Figure 13: Button

Figure 13: Button

Conclusion

Creating a Power BI Report Theme is essential to create cohesion over all the different reports across your organization. But you shouldn’t limit yourself to only the features you can adjust from within Power BI Desktop.

Go a step further and decide as an organization if you should include gridlines by default, or should every visual have a title by default. The by default part here is the most important because every report author can still change the visual formatting options no matter what the report theme defaults to. But it’s an easy way to incorporate your design philosophy for your reports as a starting point.

For more insights & research, visit the element61 Knowledgebase