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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.