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
RachelFoulg
Frequent Visitor

How to only pull in certain number of rows from folder of Excel spreadsheets?

Hi,

 

This is my first forum post! I'd love some help with a difficulty I've been having please.

 

Every day I receive a spreadsheet via email that contains a list of our products, their chart rankings, and their stock status. The number of data rows varies each day but can have anywhere between 26,000 - 76,000 rows of data. I currently save each day's Excel file in a folder and then use PowerBI to connect to the folder, add the date using applied steps in the PowerQuery editor and then combine/load so that I can analyse the data over the long-term.

 

The problem is, this is a huge amount of data that we don't necessarily need. We only really want to analyse our top selling/ranking products, so I'd ideally like to only import the top 10,000 (or even 5,000) rows of data from each spreadsheet every day. Does anybody know how I can do this easily? Or have a better solution?

 

Thank you very much if so,

 

Rachel

4 REPLIES 4
v-henryk-mstf
Community Support
Community Support

Hi @RachelFoulg ,

 

According to the error message, you cannot merge binary files directly.
If these files are located in the same folder, you can refer to this document to merge the binaries in the Power bi desktop.

Combine files (binaries) in Power BI Desktop - Power BI | Microsoft Docs


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

RachelFoulg
Frequent Visitor

When I tried to use the FilterRows parameter I get the following error:

Expression.Error: We cannot convert the value 5000 to type Binary.
Details:
Value=5000
Type=[Type]

amitchandak
Super User
Super User

Thank you for this, unfortunately I can't get it to work for me. I tried from a new blank document, I click Get Data, navigate to the folder I want, click transform and load as each spreadsheet contains two blank columns at the end of a table so these need to be deleted first before Power BI will load them. My queries look like this afterwards: Power Bi Help.jpg

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.