This post explains you how to get the Power BI report subscription as a PDF format. Yes, this will be an interesting solution because Power BI doesn’t send subscription report in pdf/pptx formats. It is always image file as of March 2020. We may expect pdf/pptx formats in future updates.
There are many paid 3rd party applications are available to get the report in pdf formats but this post explains you the process or automation which converts the report easily with using your Power Automate license. Most of the organization are using O365/M365 for Power BI subscription. Those are still getting Power Automate licenses are free. Please check with your M365 admins.
Let me explain the scenario,
I have a report called “IT Spend Analysis Sample” in my workspace and I set up the subscription for all the pages of the report. As you know, it will trigger an email for each report page. I need to get a pdf with all the reports pages (images).
As we get separate emails for each report page, we need to collect all the images and combined them into a single file and get as pdf format.
I am using Power Automate for this whole process. This solution is using SharePoint folder to place the images and final pdf file but this is also possible with OneDrive & Local Folder or any other storage that Power Automate supports.
4. Next, “Apply to each” condition.
5. Set variable FilePath as “Filename with Extension”.
6. Next, “Get file content using path” action. Check the value below.
7. Set variable JPG as – dataUri(body(‘FileContent’))
8. Next, Append to variable Report – concat(‘<img src=”‘,variables(‘JPG’),'”/>’)
9. All the above processes are within apply to each loop and next add an action after apply to each. Create file in SharePoint with html as file extension. Use variable report as file content.
That’s it. Now, run the flow it will store the pdf file on the given folder as like below.
Open the html and check the result. It will have all the images as one by one which is nothing but the report pages.
You can print the html and save as pdf. It is a manual process.
Added the screenshot of full flow. Please check it and let me know if you have any doubts.
One more information, Microsoft Power BI team has released new REST API to easy this process. I will cover that in my next post so stay tuned.