How to Set Custom Color Themes in Microsoft Power BI
When publishing internal and external reports for your business it is important to be consistent with your branding standards by using the same color schemes and logos. Microsoft Power BI it a great tool for creating and publishing dynamic and interactive reports and it allows for the customization of colors to match your brand standards. This blog will provide instructions on how to use Microsoft Power BI to create reports you are proud to share.
Power BI allows for a report creator to set the colors used on each visualization manually, and although this creates the desired result, it is time consuming. To set custom report color themes quickly and easily in Power BI that can be used repeatedly, you will need to enable the color themes option and create a simple JSON file of your preferred colors. If you haven’t worked with JSON before or don’t have experience writing code, have no fear; anyone can write the JSON needed for this simple customization.
Enable Custom Report Themes
First, you need to enable custom report themes in Power BI using the desktop version of Power BI. Open a new Power BI desktop file. Select the File menu, click Options and settings, and select Options.
The Options window will open. In the Options window, on the left you will see a column of settings under the Global heading. Select Preview features. In the Preview features window, check the box for Custom report themes. Power BI will then prompt you to restart the program. (Please note, custom report themes are a Preview Feature in Power BI at the time this article is being written, hopefully in the future this feature will be standard and will not require this step).
Figure 2 - Power BI Options Menu
Once you restart Power BI, you will then have a new icon for Switch Theme on the Home tab. This icon will now be present on any Power BI file opened in Power BI desktop going forward.
Figure 3 - Power BI Switch Theme Menu Option
Create the Custom Color Theme
You can copy and paste the following JSON into Notepad (or code editing software). The colors must be expressed in hex code preceded by the pound sign #. If you are unfamiliar with hex code for colors, there are many websites available to help you convert standard RBG color codes to hex. The only portions of this code you want to change are the name and hex colors.
"name": "Example Theme",
Your color theme must have a name and you must have at least one data color. The background, foreground, and table accent are optional. I recommend listing up to eight data colors. If you list fewer than eight colors, Power BI will select default colors for the remaining un-customized color options. If you list more than eight colors, the other colors will show up on your visualizations, but will not show up on the manual color selection drop down.
To remove the optional portions, simply delete out that section of text. For example, if you want the background and foreground to be the default Power BI colors (Power BI default foreground and background are white, hex #FFFFFF) and do not want to specify the table accent, you would use JSON that does not list these optional items:
"name": "Example Theme",
Once you have your JSON code written save the file as a .json. If using Notepad, click to save and then on the file name, change the extension from .txt to .json
Figure 4 - Saving JSON Code
Using Custom Color Themes
Now that you have created your custom color theme using JSON, you need to import it into your Power BI report. The custom color themes work best when starting a new Power BI report. You can apply the theme to an existing report, but will then have to update manually any visualizations that already exist.
Open a new Power BI desktop file, select the new Switch Theme button on the Home tab. Select Import Theme, and use the file explorer to find the .json file you created for your theme. You will then get a pop up to let you know your theme was imported successfully. If you receive an error, go back and look at your JSON code and make sure you aren’t missing a comma or quotation marks or if there is some other error present.
Figure 5 - Power BI Import Theme Option
Figure 6 - Import Successful Confirmation
Now when you create visualizations, the colors will default to those you created in the JSON file. When you manually go to change colors inside of a visualization, your color options will also show up as those you specified in the JSON file. If you have applied your theme to an existing report, you will still have to update the colors on each existing visualization manually, but the theme colors to select from will be those from your custom theme.
Figure 7 - Custom Color Theme in Power BI
Now your report will have your standard brand colors and you can have consistency across your company reports.
If you would like to learn more about utilizing Power BI in your business and the power of interactive and dynamic reporting, please contact our business intelligence team today.
Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.
- Login Error: Communication protocol mismatch between client and server
- Creating a Date Table in Power BI
- The Top Eight KPIs Retailers Should Be Tracking (with Formulas) for Your Retail KPI Dashboard
- Difference Between IaaS, PaaS, and SaaS And When You Need to Use Them
- How to Set Custom Color Themes in Microsoft Power BI