When customizing the look of your Power BI reports, you may have wondered if you can change the background color of your visuals.
This is especially important when you have changed your canvas color and want to make the backgrounds of your visuals transparent.
In this article we will show you how to change the background color of visuals in Power BI and how to set up transparent backgrounds for slicers, tables and matrixes.
How do I change the background color of a table in Power BI?
To change the background color of a table, or any visual in Power BI, you can do this in the Visualizations menu.
Open up the menu and click on the ‘General’ section as shown in red below.
Then open ‘Effects’ and ‘Background’.
This will give you the option to turn the background on/off and change the color or transparency.
Transparent backgrounds in Power BI
Slicer
Here is an example of a slicer in Power BI with a default white background.
The canvas is a grey color as you can see around the slicer.
You can remove the background color by navigating to Visualizations > General > Effects > Background as shown below.
Then, toggle the background selection from ‘on’ to ‘off’.
This will remove the background color from your slicer in Power BI.
It will make it transparent instead of white.
You can also change the transparency to 100%, rather than turning off the background. This will have the same effect.
This is the result of removing the background color for the slicer:
Table and Matrix
Here is an example of a table in Power BI with a default white background.
The canvas is a grey color as you can see around the table.
To change the background color from white to transparent, the method is exactly the same as other visuals.
However, for tables and matrixes you must also change the style preset to ‘None’. As shown below.
After you have set the style preset to none, then head over to Visualizations > General > Effects > Background and turn the background off or change the transparency to 100%.
This is the result of removing the background color for the table:
What is the Power BI code for transparent?
To create a transparent color code in Power BI, you need to create a measure using the following M code below:
Transparent Background Measure = "rgba(255,255,255,0)"
Once you have created a measure using this code, you will be able to select it to provide a transparent color.
You can select this measure by clicking the ‘fx’ button when you go to select a color.
Then choose ‘Field value’ under ‘Format Style’ and navigate to the table your measure is held in and select it.
This is old but it inspired me. I came up with a slightly different solution … the navigation buttons were laid out in a grid, grouped into areas that the users could / could not access.
Then all the buttons that the users may not be able to see were overlayed with a rectangle shape, the background was either set to transparent or white, depending on their RLS.
Then for each page, the entire page was covered with a rectangle with the same background, either transparent or white. It effectively hides all visuals at once.
Still some table RLS required so that the browser doesn’t temporarily show data that it shouldn’t before the white rectangle is rendered over the top but the entire visual side is much simpler.
Thanks for your reply!