Convert Power BI Dashboard to PDF using Microsoft Flow

Whether your data is a simple Excel spreadsheet or a collection of cloud-based and on-premises hybrid data warehouses, Power BI helps unify data from many sources to create interactive, immersive dashboards and reports that provide actionable insights and drive business results.

In this walk-through, we’ll create a flow that runs once a day and automates the process of delivering a PDF version of the Power BI reports\dashboard.


Make sure the following is in place:


Getting the Power BI Publish to Web URL

  1. Navigate to a report in your workspace that you can edit, select File > Publish to the web.

Publish to web      2. Review the content on the dialog, and select Create embed code as shown in the        following dialog.

Create embed code

3. Review the warning, shown in the following dialog, and confirm that the data is okay to embed in a public website. If so, select Publish.

Publish to web-1.jpg      4. In the next dialog, copy the topmost URL. We will use this later in the Flow.

embedded in code.jpg


 

Create a Flow:

  1. Sign into Microsoft Flow:

2. Select the My flows tab, and then create a flow from a blank.

Create from blank.jpg

3. In the Search all connectors and triggers box, type Recurrence, and then select Schedule – Recurrence.

Recurrence.jpg

4. In the Recurrence dialog box, specify how often you want the flow to run. For example, specify 1 under Interval and day under Frequency if you want the flow to run every day.

Recurrence dialog box.jpg

5. Select + New step, Add an action, and then type Muhimbi  into the search box to search for all actions related to Muhimbi PDF Converter. Select the Muhimbi PDF – HTML to PDF action.

Muhimbi PDF - HTML to PDF.jpg

6. This will open the Muhimbi PDF – HTML to PDF card. Configure the Muhimbi PDF – HTML to PDF card by pasting the URL obtained from Step 4 under “Getting the Power BI Publish to Web URL” section and other parameter’s with reference to the screenshot below.

Configure the Muhimbi PDF - HTML to PDF.jpg

7. Select + New step, Add an action, and then type outlook into the search box to search for all actions related to Microsoft Outlook. Select the Office 365 Outlook – Send emails action.  This will open the Send emails card. Configure the Send emails card with reference to screenshot below.

Send an Email Configure.jpg

 


Run the flow:

  1. Sign into Microsoft Flow, select My flows, and then select Run now.

Run Flow.jpg

2. Congrats, you should receive an email with Power BI report as a PDF attachment.

Save attachment.jpg


Frequently asked questions:

  1. When you use Publish to web, can the report or visual be viewed by anyone on the Internet?

Yes anyone on the internet can view the report, there is no authentication used when viewing these reports. Only use Publish to web with reports and data that the anyone on the Internet (unauthenticated members of the public) should be able to see. This includes detail level data that is aggregated in your reports. Before publishing this report, ensure you have the right to share the data and visualizations publicly. Do not publish confidential or proprietary information. If in doubt, check your organization’s policies before publishing.

Workaround\Note: The URL generated by Publish to Web Power BI features cannot be guessed unless it is physically shared.


2. My report has multiple pages, which page does it Convert?

It Converts the first(default) page.

Workaround\Note Create a page and set it as default with the visualization that needs to be Converted to PDF.


3. Does the PDF capture, refreshed data?

Yes, it captures refreshed data. Data refreshes are automatically reflected in your embedded report or visual. It can take approximately 1 hour for refreshed data to be visible from embed codes. You can disable automatic refresh by selecting do not refresh on the schedule for the data-set used by the report.

Thanks for reading and Happy Converting 🙂.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s