Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jolyon
Helper III
Helper III

import of empty rows from Excel-file in SharePoint?

Hi everyone,

I urgently need your help.

I made a report, importing the data from Excel-file in SharePoint(i.d.giving in Power BI the path to this file). The idea was, that I refresh this Excel once a week without changing the name or path, and then I can refresh automatically the Power BI report.

The report refreshed  correctly a couple of weeks,but today I  have  got a problem:

when refreshing the data Power BI took into consideration also empty  rows after the last Data row, i.e.

if my Excel looks like this:

2.png

 

then Power BI takes both Data and empty rows,which I do not need(here is only an example, I have got actually minimum 500 null-rows):

1.png

That is why my Primary Key Table, which has the formula "Category ID = DISTINCT(Table1[Category])" can not refresh, and gives warning: "The table with Primary Keys can not contain NULL Values".

 

How can I "tell" Power BI to take only rows with data, and not empty rows?Are there any ideas?

 

As the report thought to be automatically refreshed every week, I try to find a solution like "exception catching", so that i should not manually delete all the rows or rebuild the report..

Probably there is also better way to integrate SharePoint file to Power BI?

 

Thank you!

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @Jolyon,

 

In your scenario, it seems the Excel was refreshed with some empty rows contained, while you didn't exclude those empty rows, so that the error throws out. Please open the report in Power BI Desktop and open Query Editor, then check the "Remove Blank Rows". Then republish the report to service.

 

q1.PNG

 

Best Regards,
Qiuyun Yu

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

Hi @Jolyon,

 

In your scenario, it seems the Excel was refreshed with some empty rows contained, while you didn't exclude those empty rows, so that the error throws out. Please open the report in Power BI Desktop and open Query Editor, then check the "Remove Blank Rows". Then republish the report to service.

 

q1.PNG

 

Best Regards,
Qiuyun Yu

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors