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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Frixel
Post Prodigy
Post Prodigy

When first 2 rows are empty from each file and third row is header?

Hi all,

 

How to act if of every document that comes in the folder the first two lines of lines are empty/not important and the third line are the headers?
Can I tell power bi that it should only look at every document from the third line?

 

Like this when i have combine.

Frixel_1-1633804883832.png

 

1 ACCEPTED SOLUTION

Hi @Frixel ,

 

It is not 1 query, but 4 queries that are grouped. It contains the logic required to combine the files from your folder.

The set of queries is created automatically when chosing "Combine Binaries" in the column header of the column in the navigation table with the files in your folder.

vhenrykmstf_0-1634633649728.png

 

You may get rid of it by converting the files to tables, using native functions like Csv.Document or Excel.Workbook, depending on the file types in your folder.   Here is the similiar solution.


Best Regards,
Henry


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

16 REPLIES 16
v-henryk-mstf
Community Support
Community Support

Hi @Frixel ,

 

Has your problem been solved? If not please point out, looking forward to your feedback.


Best Regards,
Henry

 

Frixel
Post Prodigy
Post Prodigy

Strange is that when i have 1 file (sample) in the folder it look that it is okay. (green line)

When i copy that file with only ' copy'  in the file name it is also okay with 2 files in the folder. (also green line)

When there is a new file (format and colomns exactly the same as the sample) with part of new name there is a error to see in the last row in the query where the new rows must begin.

I hope you understand me.

 

Frixel_0-1633938832726.png

 

Frixel_1-1633938941464.png

 

Frixel_2-1633939106533.png

 

jdbuchanan71
Super User
Super User

Are you combining them together into a single table so that files 2, 3, 4 etc have the first 2 rows blank?  If that is the case, after you remove the first 2 rows and set the headers you can filter NULL out of the first data column to get rid of the other blank rows.

jdbuchanan71_0-1633806827225.png

 

Before i can do that i see there are errors on the 2 file`s in the folder.

what could be the cause of that?

 

Frixel_0-1633849992409.png

 

In the step before it looks fine, because there are 'green' colomns.

Frixel_1-1633850400354.png

 

By the step for combine i think it is strange that by 'sample file'  the whole filename is but under it by 'display options' there is just a part of the name. (not after the second _) 

 

Frixel_2-1633850745720.png

 

jdbuchanan71
Super User
Super User

@Frixel 

You can tell PowerQuery to remove the first 2 rows then promote the top row to header.

jdbuchanan71_0-1633805898730.png

 

Thanks,  i see that option now.

And that works fine, but when there is a new file in the folder then power bi give a error on that file.

@Frixel 

 

Did you add that remove the first two rows step to the "Transform Sample File" query? Add your steps to the "Transform Sample File" query; then, those steps will be applied to all files from that folder.

 

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

 

Appreciate your Kudos!!

 

Hi @VahidDM 

 

Ehh, i do that in the step next when i combine the files.

Hi @Frixel 

 

What error have you faced?

Do those files have the same sheet?

 

Appreciate your Kudos!!

 

Hi @VahidDM 

Now i see that the filenames are different but the sheetnames are the same.

I think That is the problem?

@Frixel 

The file names can be different but the sheet name should be same. the might be when you added a new file the sample file changed and because of that some steps don't work well.

Check that.

 

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

Appreciate your Kudos!!

 

Hi @VahidDM 

I really don`t know what goes wrong.

The sample file is not changed and the new files are the same as the sample.

 

Frixel_0-1633932989191.png

 

aj1973
Community Champion
Community Champion

Hi @Frixel 

The name of the excel file should stay the same as the original file you imported and combined into Power Query otherwise Power Bi won't reconized it. 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Hi @aj1973 

You say: The name of the excel file should stay the same  but my file`s  in the folder are like this.

 

LS_20211010_16h33m.xlsx

LS_20211010_21h14m.xlsx

LS_20211011_07h34m.xlsx

LS_20211011_08h01m.xlsx

 

Before combine i have the text filter to: Contains  LS_

 

Thats okay?

 

After searching on this forum i changed this:

Frixel_0-1633949055385.png

Frixel_2-1633949390654.png

 to this:  

Frixel_3-1633949432054.png

 

I don`t know what it is doing but it works.

Can somebody explain what it is doing in this query and do i good for this?

Hi @Frixel ,

 

It is not 1 query, but 4 queries that are grouped. It contains the logic required to combine the files from your folder.

The set of queries is created automatically when chosing "Combine Binaries" in the column header of the column in the navigation table with the files in your folder.

vhenrykmstf_0-1634633649728.png

 

You may get rid of it by converting the files to tables, using native functions like Csv.Document or Excel.Workbook, depending on the file types in your folder.   Here is the similiar solution.


Best Regards,
Henry


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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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