Changing outer background of Power BI reports

When you publish a Power BI report to web, its outer background color will be grey by default. This may be undesirable if your report does not fit the screen perfectly, which will likely happen, because not all screens are of the same size and ratio. This blog post shows how you can change the outer background color.In short, we want to go from this:

To this, for example:

For this, we are not going to touch Power BI Embedded at all. Instead, we will employ report themes.

To control the outer background color, we can use the new outspace theme property, which was introduced this month (July 2018). Here is a simplistic report theme file code:

{
  "name": "DaniilMaslyuk",
  "visualStyles": {
    "*": {
      "*": {
        "outspace": [{
          "color": {
            "solid": {
              "color": "#ffffff"
            }
          }
        }]
      }
    }
  }
}

To try changing the color yourself, save the above code as a .json file and import it to your report:

If you don’t see the button above, you need to enable the Custom Themes preview feature in File > Options and settings > Options > Preview features > Custom report themes:

Happy coloring!

  • Philip Ellenberg

    Great post, thanks for sharing! Is it possible to apply the outspace theme property to individual reports which are published via iframe using the Power BI service, or is it only applicable to actual dashboards?

    • Philip, could you please clarify your answer? This blog posts describes how you can apply the outspace property to reports, which you can publish to web (same as “via iframe” you mentioned I believe), not dashboards.

      • Philip Ellenberg

        Hi Daniil, I’ve tried using the JSON snippet above in a theme (and also created a standalone theme with just the snippet above), then published my report and checked it via iframe only to find the same gray background. I’m running Power BI 2.59.5135.781 64-bit (June 2018) — is it possible I need to wait until the July 2018 version is released for this to work correctly? Not sure what’s going wrong.

        • There are three things to keep in mind:
          1. You will not see any differences in Power BI Desktop June 2018 build.
          2. When you publish to PowerBI.com without publishing to web yet, you should already see white outer space. If not, hit Ctrl + F5. Sometimes Power BI service caches some stuff, and only hard refresh helps.
          3. If you already had this report published to web and all you did was re-publishing it with a theme, then you should wait (up to 24 hours from what I heard) till the cached version updates.

  • Alexandre Henrion

    I have just been through the process to get rid of the grey background. It worked perfectly, thank you very much for this tutorial ! I was wondering though, if it would be possible to remove the grey color for the lower navigation bar as well ( Where There is arrows, “Page 1”, “Page 2”, etc… ) I’ve been looking at the elements within microsoft documentation on Theme editing, but I couldn’t find it. I was using this page of documentation : https://docs.microsoft.com/en-us/power-bi/desktop-report-themes#report-theme-json-file-format . Do you an insight about how to do it or maybe more relevant documentation ?

    • Alexandre, glad you found this blog post useful! Unfortunately, I don’t know if it’s possible to alter the lower navigation bar just by using a theme. This should be possible with Power BI Embedded though.

  • juan carlos hernandez

    Hi! After applied the new theme, I ´d noticed a pretty white small line around the dashboard, is there a way to delete/hide it? Greets from Mexico 🙂

    • Hi, Juan Carlos, would you mind sharing your theme file? Otherwise it’s a bit difficult to troubleshoot.