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
duimdog
New Member

retrieving source file name while using table combine

I have a series of Excel files that I want to combine in Power Query. I don't want to use the helper queries, so I use Table.Combine(source[Data]) to combine the Tables in my Source step. Works fine.

But now I want to retrieve the name of the sourcefile the data comes from. 

I tried to add a new column to the individual tables by adding

List.Transform(
    Source[Data],
    (outer_table) => Table.AddColumn(outer_table,"SourceName", 
    each (Source[Name])))

but that generates a list of all the filenames instead of the individual filename of each file.

Anyone a suggestion how to fix this?

1 ACCEPTED SOLUTION
dufoq3
Super User
Super User

Hi @duimdog, it is possible. With the highlighted part you transfer binary to table and the other part add new column with SourceName.

 

dufoq3_1-1740595128965.png


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

View solution in original post

5 REPLIES 5
duimdog
New Member

I started all over and succeeded in replicating your example and with success!

Thank you for your solution!

You're welcome 😉


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

duimdog
New Member

Not (yet) succesfull: I get an error in the "Tbl" column, stating that "it cannot convert a value of type Binary to type List.

It is hard to help you without any screenshots, data etc...


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

dufoq3
Super User
Super User

Hi @duimdog, it is possible. With the highlighted part you transfer binary to table and the other part add new column with SourceName.

 

dufoq3_1-1740595128965.png


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

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.