Working with Themes – Part 4

In Part 1 of this series, you learned how to use some of Power BI’s built-in themes to change the color themes of your reports. This of course was better than having to manually customize all the elements in your visualizations, but you were limited in the number of themes available.

In Part 2 you learned about Microsoft’s Theme Gallery where 3rd party developers have offered their custom themes, mostly for free, to anyone who wanted to use them. Yes, you had to go through a few more steps, but this opened the doors to dozens of new themes that you could use to add different colors to your reports.

In Part 3, you learned how to use the new Customize the Current Theme feature that was added as a preview feature in December 2019. One of the great things about this feature is that it allows you to start from any theme and customize it to look exactly the way you want. But that is just part of the benefit of customizing a theme.  The rest is what I’ll talk about today.

Exporting Your Customized Theme 

In the ancient past, as in a few months ago, if you wanted to theme all of your Power BI reports the same way, you not only had to manually set all of the color and text attributes for every visualization in a report, but you had to write down those settings so that on the next report you could configure the colors and text attributes the same way. While that was certainly doable, it was usually not worth the time and effort. A few users may have figured out enough of the JSON coding of themes to create their own custom theme and use it in each of the subsequent Power BI Report files. We will talk more about that method next time and why that might be your preferred option.

However, with the ‘Customize the Current Theme’ feature, you can start with an existing theme from the Theme Gallery that is close to what you want and customize it one time and then reuse it and even share it. That’s right. One time! Because with the addition of the Customize the Current Theme feature, you also have the ability to export the theme from your current Power BI file and save it as a JSON file.  You can then import this JSON file using the ‘Browse for themes’ option just like any other theme file you may have downloaded from the Theme Gallery we talked about in Part 2.   

Export your custom themes 

You just have to give your new theme a unique name (remember that was on the first panel of the Customize the Current Theme dialog). You can save the theme file anywhere, but I personally like to keep a single folder on my hard-drive that holds both my downloaded and my customized themes.

Making your Customized Theme a Standard 

Once you create a theme that is branded to your own personal tastes, your school or college colors, your corporate or organization’s color palette or for any other reason you need a special theme, you can save that theme definition as a file and share it with others. If everyone loads that theme into their report, then all report visualizations will look like they are all from the same person or part of one branded organization no matter who creates them.

One way to achieve consistency in branding is of course to share the exported theme to everyone so that they can import it into each Power BI file they create. However, this method could be problematic because some Power BI Users may not load that theme into their reports and proceed with either a different theme or with manually customized colors and fonts. Unfortunately, there is currently no way to change the default theme within Power BI. Maybe that feature will be a future enhancement.  In the meantime, one way to make compliance easier is to open a new but empty Power BI file, one in which no data has been loaded yet. Next, open View -> Themes and browse for and open a saved theme. Then save the empty Power BI file without adding any data to it. Then when you or anyone else begins a new Power BI file, start with this saved branded file to start a new report. For example, I save an empty Power BI file with my preferred theme using the name default.pbix. If I start a new report with this file, I will automatically have the same theme I used in my other Power BI files.

If you follow the suggestions above you can achieve a consistent look and feel across all of your Power BI reports. When used at a department, corporate, or organization level, it lends an air of professional branding to your work rather than the appearance that everyone if off working on their own.

What To Do When a Custom Theme Appears Not To Work 

Normally, when you apply one custom theme on top of another custom theme, the new theme replaces all the colors and fonts of the old theme (unless it is such an old theme or one that only defined a limited subset of the elements it would customize). Sometimes when you attempt to brand a previously created Power BI report, the branding colors or fonts do not appear to work, or perhaps they work on some visualizations but not on others.  Does this mean that there is something wrong with your branding? Probably not. It merely means that the default color or font used on one or more visualization was manually changed prior to applying the theme. Theme changes will not overwrite manually set branding. I suppose this is a good thing because the assumption is that you set those branding changes on purpose and you would not want to lose them due to applying a different custom theme to the rest of the report.

But what if you really wanted the branding of the custom theme to apply everywhere with no exceptions. Well, I suppose you could start over with the desired theme loaded first before loading data and creating visualizations. However, that would require a lot of work. Another way to fix this problem is to go into the formatting of each visualization and revert the branding to the default. Then reapply the desired custom theme.  That is still potentially a lot of work, but not as much as starting all over.

To revert the formatting of a visualization to the default, you do not have to remember the original colors, fonts, or font sizes. That would still be considered a manual customization.  Rather, you can select the visualization and open the Format panel. Expand each section within the Format panel and look for the text ‘Revert to default’ at the bottom of the section. Note that not all format sections may have or need this option.   

Revert any color or font to the default 

Even if you manually changed the color to other colors taken from the prior theme using the theme’s color palette, you will need to revert these colors and fonts to their original settings before a new theme will replace them.

Well that is all for this time. Next time, we will begin a dive into creating JSON files directly. Why would you want to do this?  Afterall, now with the ability to customize themes using a dialog, defining your own theme is simple and easy.  Well, you will have to come back next week to see if building a theme from scratch is right for you.