Aug 26 2019 05:18 AM
When I click into the binary content, I will lose the file name column, like the picture below. What can I do to keep the file name column ?
Aug 26 2019 07:10 AM
If you click on Combine Files on entire table like this
From Folder connector shall keep file names, like
If you keep only Content and Name columns result will be without filenames.
Aug 26 2019 05:38 PM
@Sergei BaklanThank you for your help. I really can't figure out how to Combine Files on entire table, the file name column will still be lost if I didn't delete other columns... I'm using power query built in excel, not Power bi.
May 12 2022 10:24 AM
@Sergei Baklan unfortunately, that didn't work for me either. I tried it in Excel as well as PBI Desktop.
May 12 2022 12:49 PM
Both Power BI Desktop and Excel work exactly the same way, at least latest versions. To be sure
- we use From Folder connection and select folder on local drive
- select table or sheet for the sample file
- query returns 8 columns, from Content to Folder Path
- click on Combine Files icon to the right Content column name
If check steps, query generates, among others, these two
#"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
#"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File"}),
So, it renames Name to Source.Name and returns this column with file names into result.
Another scenario if we, for example, select Content and Name and Remove other column. Or whatever else we do. Power Query recognizes that we transform source manually and doesn't insert above two steps automatically. Click on Combine Files and query generates only
#"Removed Other Columns1" = Table.SelectColumns(#"Invoke Custom Function1", {"Transform File"}),
Transform File column is expanded and we have only transformed range without file names. However, if we would like to keep Name for this scenario as well, on the step
add Name manually in formula bar
and file names will be kept.
Mar 18 2023 05:46 AM
@@mengshen
Simple after combining binary in Power Query replace
"= Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File (2)"})"
with
"= Table.SelectColumns(#"Renamed Columns1", {"Source.Name","Folder Path", "Transform File (2)"})"
Nov 03 2023 09:34 AM