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 August 31st. Request your voucher.

Reply
jlpa
Regular Visitor

Load data from txt tab separated file

Hello,

 

I am trying to load 2 txt files with same format. As you see i have columns Name and Path in both files.

 

 

File1-below

Name Path
test.txt c:\local\test.txt
test6.txt c:\local\test6.txt

 

File2-below

Name Path
test.txt c:\local\test.txt
test6.txt c:\local\test6.txt

 

 

Objective is to load both content of files in one query. I am getting the header of second file  as a row when it is not the objective. Header of second file is to be considered as row.

Capture.PNGCapture2.PNG

 

Thank you for your help

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jlpa,

 

When we use get data from Files, this structure is created:

 

GetDataFromFiles1.png

 

You have to select the table Transform Sample File form <FolderName> and  apply Use First Row as Headers to that table:

GetDataFromFiles2.png

 

And this modifies the final table and solves the problem you're having.

GetDataFromFiles3.png

 

Note: You must delete the last step Changed Type because the name of the columns will not match, due to the Promote Headers that we apply,

 

Regards.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @jlpa,

 

Apply Promote Headers ("Use First Row as Headers" in Transform menu) in the table Transform Sample File from <FolderName>, this should solve the problem.

 

Regards.

Hello Felipe,

 

See picture below. When i load files First row are columns not recognized as headers. 

Headers are not recognizedHeaders are not recognized

 


Even if a apply "Use First Row as Headers" in Transform menu, because i have 2 files (second one has headers also) i end up with following below, that has header of second file as a row 😞. I have check files and they look ok. 

See that Header of second file is a rowSee that Header of second file is a row

Thank you for your help!

 

Anonymous
Not applicable

Hi @jlpa,

 

When we use get data from Files, this structure is created:

 

GetDataFromFiles1.png

 

You have to select the table Transform Sample File form <FolderName> and  apply Use First Row as Headers to that table:

GetDataFromFiles2.png

 

And this modifies the final table and solves the problem you're having.

GetDataFromFiles3.png

 

Note: You must delete the last step Changed Type because the name of the columns will not match, due to the Promote Headers that we apply,

 

Regards.

Hello Felipe,

 

Solved. Thank for your help 🙂

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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