Power BI Templates

Microsoft released today a new update of Power BI Desktop with some new cool features here. In particular, I find the new Power BI templates as one of the more powerful tools, as it allows me to easily reuse my dashboards in the most easier way 🙂

Update: 15 months have passed since I wrote this article. And I now have an improved version of the Facebook Page Template. Learn more here.

Let’s see an example using one of the dashboards that analyzes a specific Facebook Page:

Screenshot_50

I opened the .PBIX file and clicked Edit Queries.

Screenshot_52

There is a new button – Manage Parameters.Screenshot_53

After I clicked the Manage Parameters button, a new Parameters dialog appeared.

I clicked on New.Screenshot_54

I added a new parameter. Name: FacebookPage. Then I added a description (“The Facebook Page object name or ID”)Screenshot_55

I change the Type from Any to Text.Screenshot_56

I added the current value for the FacebookPage parameter by editing Current Value. Then I clicked OK.Screenshot_57

That’s cool. A new item was added at the bottom of the Queries pane. That is my new parameter. I can also edit it from the main pane.

Screenshot_58

Now is the tricky part. I edited the query which connects to Facebook and modify the M expression to use the new parameter instead of the static Facebook page name that was previously used.

Screenshot_60

The new parameter FacebookPage can be used on other queries. Simply refer to it in the code.Screenshot_61

I could also apply dynamic filtering of specific columns with the new parameter. To do it I clicked on the new ABC drop down menu, and selected Parameter.Screenshot_70

Then I could select my parameter. Screenshot_71

After using my new parameter, I closed the Query Editor.

Screenshot_62

Power BI Desktop performed a refresh which was based on the new Current Value that I used for my parameter.

Screenshot_64

After I saved my Power Bi Desktop file, I clicked File –> Export –> Power BI Desktop.Screenshot_65

I clicked OK in the new Export Template window (Here you can also describe your template).Screenshot_66

The Save As window appeared. I saved my template as a .pbit file.Screenshot_67

Now, whenever I need to create a new Facebook dashboard for a different Facebook Page, I can use this template. I click File –> Import –> Power BI TemplateScreenshot_68

After I select my .pbit file, the Enter Parameters window appears.

Here I can enter the new Facebook Page, and click OK.Screenshot_69

Then, the new dashboard gets refreshed with the new Facebook Page.

An awesome feature!!!

5 comments

  1. Pingback: BI-NSIGHT – Power BI (Service Update, Desktop Update, Dynamic Security in Service, Content Pack Dynamics AX Cost Management Pack) – SQL Server 2016 (RTM Release 01 June 2016) – Gilbert Quevauvilliers – BI blog

  2. fwatsonatwork Reply

    This is awesome – thank you! Question… is there a way to edit the template after it has been exported? I would like to change a color here, a font there, etc. and I can’t figure out how to change the actual template.

    • Gil Raviv Post authorReply

      Thank you. You can load the template with your values as parameters, change the visuals and export it again as PBIT

Leave a Reply