March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All,
I have a Power BI report with 5 pages. One of the page (3rd page) has a table with multiple rows. My requirement is to send the 3rd page data as an excel attachment via email to users.
Can someone please suggest on how to create a Power Automate flow for this requirement?
Thank you.
Solved! Go to Solution.
Ahh Sorry I didn't notice you wanted it as an attachment.
Use HTML to embedd the table in the body of the email.
Use CSV to send as an attachment that will open in Excel.
When you are happy it works, change your trigger from manual to Power BI when button is clicked 🙂
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Hi @POSPOS
I want this data stored outside of Power BI.
First thing to do is go to View | Performance analyzer and toggle this on.
When you click Performance analyzer a new pane will appear on the right.
This will show you how long each of your visuals takes to load, click on Refresh visuals button.
When you click, all visuals will appear beneath.
Click on the + icon and choose Copy Query to add the DAX code to your clipboard.
We now have the code Power BI uses to generate the visual.
Now to extract the data you want, swap to Power Automate in your browser.
Create a new flow by clicking on New flow | Instant cloud flow.
You can choose from several triggers but here we choose Instant cloud flow.
Give your flow a suitable name and choose Manually trigger a flow to create your new flow.
Manually triggered flows run when you choose but there are other options.
This will open up your designer where you choose all the steps of the flow. Click on the + to add a new step.
Choose Add an action
This will list out all the actions we have to choose from. Search for Run a query against a dataset and you should see Power BI.
We want to run the query copied earlier.
Select the Workspace and Dataset of your published report, then paste the code from your clipboard into Query Text.
Power Automate will create the table we saw in our report.
Now in the top right choose Save and then click on Test to run your flow.
You must save before selecting the Test option.
If you have run this flow before, you can choose Automatically to re-run with previous data.
For now choose Manually and select Test to try your new flow.
You can run the flow by clicking Test.
We should now see each step with a tick next to it. You can now select the Power BI step to see the returned data.
Click on the last step to see more information.
Each step has an Inputs and Outputs section and by choosing Show raw outputs we can see our data.
Clicking here will show you a JSON file of the returned information.
Now you can see all the returned data in the body section of the output.
The headers section includes useful information like run Date.
From here you could email this data or store it somewhere like a SharePoint list!
I imagine you will want to choose Create HTML table and then add the Output of the HTML table to the body of your email.
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
@SamWiseOwl - Thanks for the steps.
I tried to follow and created a flow as below: Can you pls suggest on how to add a step to receive and email as excel.
But, the email did not come as an excel.
Ahh Sorry I didn't notice you wanted it as an attachment.
Use HTML to embedd the table in the body of the email.
Use CSV to send as an attachment that will open in Excel.
When you are happy it works, change your trigger from manual to Power BI when button is clicked 🙂
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
@SamWiseOwl- Thank you for the detailed steps and now I was able to send the report as a csv attachement via email.
One obervation is that , by default
Is this something we can control to show the total at the bottom and have the same ordering of fields as developed in Power BI report.
If you expand the CSV step there is an advanced option called columns.
Enter the column name you want, then in the second column use the lighting bolt icon to choose the field from Power BI you want in the column.
Create a new row and repeat for each column.
There is a step called FILTER that you could use to get rid of unwanted rows.
Alternatively you could create an Excel file but that requires OneDrive or SharePoint read write permissions which becomes complicated when a variety of users will be running the script.
Alternatively you could have them all run through your account but where is the fun in that 😛
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
@SamWiseOwl - Below is a sample report I created.
CSV attachment I received is as below:
As suggested, I checked the advanced options, and I do not see a list of fields from Power BI when clicked on the lighting bolt icon.
List from the lighting bolt icon.
In the Query you pasted in delete the SubTotal bit if you dont want the grand total, so here I keep the Region[RegionName] bit but delete rollup and "IsGrandTotal" also delete IsGranTotal, 0 from the TopN bit and finally delete IsgrandTotal Desc from the Order By.
The Column order in the Summarize columns is the order of the output.
So here mine is Region, Sum Qty, Sum Price
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Hi
Can you please help me I want to copy data from Power Bi workspace to Excel as I am running my flow , and I am not getting the error but the data is not copying in excel file.
here I am attching the link
Also attaching the excel file
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
82 | |
69 | |
53 | |
44 |
User | Count |
---|---|
204 | |
107 | |
101 | |
65 | |
57 |