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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Fanis_Georg
Regular Visitor

Create a time stamp

Hi everyone

 

I am preparing an inventory report where I will be uploading weekly my materials and their prices. 

Obviously the materials will be repeating everyweek and only their parameters will be changing (eg count, price etc)

My source file is saved in txt, and I usualy overwrite the file of previous week with the data of the new week.

Is there a way when the file is uploaded to create kind of a timestamp in a new column indicating the number of the week and the year, and of course i would like the data of the new week to be added on the list not to overwrite the previous. 

 

Thanks

FG

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @Fanis_Georg  - Instead of overwriting the old data, you can configure Power BI to append the new data to the existing dataset

 

extract the data, Home > Get Data > Text/CSV. load your initial dataset (e.g., the first week's data). Now in power query editor, duplicate the initial query by right-clicking it and selecting Duplicate.Name one query "CurrentWeekData" (for new weekly uploads) and another "AllData" (for the cumulative dataset).Select Append Queries as New.Append the "CurrentWeekData" query to the "AllData" query.

 

add a custom column in table, add a new column with timestamp as like below:

Timestamp = DateTime.LocalNow()

add another column 

WeekNumber = WEEKNUM([Timestamp])

one mre for year

Year = YEAR([Timestamp])

 

last one more new column , 

WeekYear = FORMAT([Timestamp], "yyyy-[Week]")

 

these helps in If you already have historical data saved elsewhere, you can manually import it once and append it to the cumulative "AllData" query.

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
Fanis_Georg
Regular Visitor

@rajendraongole1 Thank you

rajendraongole1
Super User
Super User

Hi @Fanis_Georg  - Instead of overwriting the old data, you can configure Power BI to append the new data to the existing dataset

 

extract the data, Home > Get Data > Text/CSV. load your initial dataset (e.g., the first week's data). Now in power query editor, duplicate the initial query by right-clicking it and selecting Duplicate.Name one query "CurrentWeekData" (for new weekly uploads) and another "AllData" (for the cumulative dataset).Select Append Queries as New.Append the "CurrentWeekData" query to the "AllData" query.

 

add a custom column in table, add a new column with timestamp as like below:

Timestamp = DateTime.LocalNow()

add another column 

WeekNumber = WEEKNUM([Timestamp])

one mre for year

Year = YEAR([Timestamp])

 

last one more new column , 

WeekYear = FORMAT([Timestamp], "yyyy-[Week]")

 

these helps in If you already have historical data saved elsewhere, you can manually import it once and append it to the cumulative "AllData" query.

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.