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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
lusine
New Member

CSV import - How to preserve "Date created" column in the report

Hi,

 

I am creating report that is based on cumulative data from multiple CSV files. Since each of those CSV files are snapshots and they don't have date column it's very important for me to preserve "Date created" (date when file was created), of each file in my cumultive report.

 

Initially, when I upload all CSV files I get following columns: Content (Binary), Name(file name), Date created (date when file was created), Attributes, etc...

 

How do I preserve "Date created" (date when file was created) column? Whenever I expend Binary, "Date created" is lost.


Would appriciate your help.

 

Thank you

1 ACCEPTED SOLUTION

Hi lusine,

 

Based on your description, you are using get data from folder, and you want to add a created date column to each table, right?

 

First click Binary, then add a step using M code like below:

#"Add Column" = Table.AddColumn( #"Changed Type", "Created Date", each Source{[#"Folder Path"="C:\Users\v-yuta\Desktop\Test\",Name="Test.csv"]}[Date created])

2.png3.PNG4.PNG

 

Regards,

Jimmy Tao

 

View solution in original post

3 REPLIES 3
Rfranca
Resolver IV
Resolver IV

Csv.Document

Hi lusine,

 

Based on your description, you are using get data from folder, and you want to add a created date column to each table, right?

 

First click Binary, then add a step using M code like below:

#"Add Column" = Table.AddColumn( #"Changed Type", "Created Date", each Source{[#"Folder Path"="C:\Users\v-yuta\Desktop\Test\",Name="Test.csv"]}[Date created])

2.png3.PNG4.PNG

 

Regards,

Jimmy Tao

 

Anonymous
Not applicable

Hello Jimmy, 

 

I also have the data source linked to a folder, but the code did not work for me. I have two files currently in the folder with different created dates. Is it possible to have an additional date created column in each of the table? I was thinking of appending the two tables once I have the date to distinguish the two tables. Thanks. 

 

Capture.JPG

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors