Export and email a Power BI report with Power Automate
Create a flow from scratch
In this task, you create a simple flow from scratch. The flow exports a Power BI report as a PDF, and attaches it to an email that is sent on a weekly basis.
Sign in to Power Automate.
Select Create > Scheduled cloud flow.
4. In Run this flow, select the starting date and time for your flow and the repetition frequency.
5. In On these days, select which days you want your flow to run, and select Create.
6. In Recurrence, select Edit > Show advanced options. Enter a value in At these hours and At these minutes to set a specific time for your flow to run.
7. Select New Step.
8. In Choose an operation, search for Power BI and select Export To File for Power BI Reports.
9. In Export to File for Power BI Reports, select a Workspace and Report from the dropdowns.
10. Select the desired Export Format for your Power BI report.
11. Optionally, indicate specific pages to export in the Pages pageName -1 field. The page name parameter is different from the display page name. To find the page name, navigate to the page in the Power BI service, and copy the last portion of the URL as shown in the example.
https://app.powerbi.com/groups/workspaceGuid/reports/reportGuid/xxxxxxxxxx
12. Optionally, indicate a specific bookmark to display in the Bookmark Name field. You can find the bookmark name in the report URL after bookmarkGuid=, as shown in the example. Only report bookmarks are supported, not personal bookmarks. You can specify other parameters for the Power BI report. Find detailed descriptions of these parameters in the Export to File for Power BI Reports.
https://app.powerbi.com/groups/workspaceGuid/reports/reportGuid/ReportSection?bookmarkGuid=xxxxxxxxxx
Row-level security in Power Automate
Optionally, if you want to send the report based on row-level security (RLS), you need to add the following details:
Identities Username - 1 = The effective username reflected by a token for applying RLS rules. For an on-premises model, username can be composed of alpha-numerical characters, or any of the following characters:
'.', '-', '_', '!', '#', '^', '~', '\', and '@'
. For cloud models, username can be composed of all ASCII characters. Also, username can be up to 256 characters, and can't contain spaces.Identities Semantic model - 1 = You can get this value by going to the settings of the semantic model, and then copying the semantic model ID from the address bar, as shown in this example and in the following image:
https://app.powerbi.com/groups/me/settings/datasets/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Does this work if Power BI license is pro..as far as I know this only works with Power BI premium..correct me if I am wrong..
ReplyDeleteThat's right, you need a Power BI premium license to use it.
ReplyDelete