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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.