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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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