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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors