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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
PowerUser123
Helper II
Helper II

Connect to SharePoint and add MetaData such as Create Date as Column in Table

I'm connecting to CSV files in SharePoint and for some reason the Source.Name column does not appear in my table. I'm not sure if it's because there already is a column called "Name" in my underlying data?

 

I use the following way to import files from SharePoint so I don't have all the helper queries:

 

FxRead2 Function:

(myFile as binary) => Csv.Document(myFile, [Encoding=1252])

 

Query:

let
    Source = SharePoint.Files("https://somecompany.sharepoint.com/sites/dept/", [ApiVersion = 15]),

  #"Removed Other Columns" = Table.SelectColumns(Source, {"Content"}),
  Content = List.Transform (#"Removed Other Columns"[Content], Binary.Buffer),
  Custom1 = List.Transform( Content, fxRead2),
  Custom2 = Table.Combine( Custom1 ),

 

Is there a way I can alter either the query or function above so that when the table is generated, it creates another column for some of the metadata columns such as Create Date?

1 REPLY 1
v-yalanwu-msft
Community Support
Community Support

Hi, @PowerUser123 ;

You could refer to this post.

https://community.powerbi.com/t5/Desktop/Retain-file-name-column-when-using-Folder-as-a-data-source-...

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.