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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join 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
Community Champion
Community Champion

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!

dufoq3
Community Champion
Community Champion

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.

dufoq3
Community Champion
Community Champion

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
Community Champion
Community Champion

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.