Forum Discussion
Power BI export to excel using Power Automate inserts blank row
Hello, I'm very new to all of this, and this is my first attempt to use power automate from power bi. I have a power bi report and would like to export the data to an excel file using power automate. I've been following a fairly good youtube video and I finally got it all working, however, in the resulting excel file row 2 is blank, and all of the expected data is below that. The table visual in my power bi report does not have a blank row and when I click the 3 dots on the power automate button and select show as table, there is no blank row. Where is this blank row coming from, and how can I avoid it?
Thank you,
Alan
Hi AEnns
Considering the cases why this issue may have occured, just make sure of these few points:- Verify whether the Excel file template used has a blank row
- Consider replacing blank values in Power BI measures with zeros using COALESCE to ensure consistent export.
- If these don't work, use a filter in the flow to exclude empty rows before inserting data into Excel.
6 Replies
- AEnnsNew Member
Hi Mohamed, thank you for your reply. I believe you have answered the question. The template file does have a blank row. I'm going to go test that and get back to you.
- MohamedFowzan1Super User
Hi AEnns
Considering the cases why this issue may have occured, just make sure of these few points:- Verify whether the Excel file template used has a blank row
- Consider replacing blank values in Power BI measures with zeros using COALESCE to ensure consistent export.
- If these don't work, use a filter in the flow to exclude empty rows before inserting data into Excel. - AEnnsNew Member
Hi again, Mohamed. I can't remove the blank row from the template file. It is the only row of the table that is not the header.
Alan.
- AEnnsNew Member
I think using a filter in the flow to exclude empty rows would be the way to go. Can you give me a little guidance on that? Where would I insert that into my flow. Currently I have the following steps:
On Power BI button clicked
Get file content (gets the template file)
Create file (creates the output file)
Apply to each --> Add a row into a table (Excel)
- KNPSuper User
It's a bit of a crossover topic, but you may get a quicker answer, especially to your last question, on the PowerAutomate forum.
https://community.powerplatform.com/forums/thread/?partialUrl=MPACommunity
- AEnnsNew Member
Thanks, KNP. I'll try to figure it out and if I can't, I'll ask a question on the Power Automate forum. I would like to accept Mohamed's reply as the solution, as he first correctly identified the reason for my initial problem. My bad for making it into a run-on question.
Alan.