cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Hicham-as4
Frequent Visitor

Auto generate upload date per row

Dear all,

 

Can someone help me?

 

I am generating an export to Excel two times a week and then I upload the file to Power BI Desktop to prepare an overview, actual every export includes all recent data. Example:

 

Export 15-06-2021 includes all data from 01-01-2021 YTD

Export 18-06-2021 includes all data from 01-01-2021 YTD

 

What I want is to understand if Power BI can automatically generate a date per row for each upload so i can easly know which data was exported on 15-06 and which on 18-06. This way I can create a table in Power BI with upload date + total revenue.

 

I hope its clear 🙂

1 ACCEPTED SOLUTION

Hi @Hicham-as4,

 

Add to the above:

Expand content:

vxulinmstf_0-1624526229440.png

Reserved the 'Date created' column.(Return to selected step and remove other steps)

vxulinmstf_1-1624526294797.png

vxulinmstf_2-1624526316558.png

Remove column 'Content', and expand table.

vxulinmstf_3-1624526402062.png

Then you can refresh data after add new file.

 

If you still have some question, please don't hesitate to let me known.‌‌

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

 

 

 

View solution in original post

8 REPLIES 8
v-xulin-mstf
Community Support
Community Support

Hi @Hicham-as4,

 

Get data from floders:

vxulinmstf_0-1624503159994.png

You can get:

vxulinmstf_1-1624503229910.png

In your case, 'Upload date' is Date created.

Sorted by Date created:

vxulinmstf_2-1624503623918.png

Keep top rows:

vxulinmstf_3-1624503664711.png

vxulinmstf_4-1624503711978.png

You can get:

vxulinmstf_5-1624503731394.pngvxulinmstf_6-1624503813141.png

Refresh data after uploading new files to folders, you can get:

vxulinmstf_7-1624503999338.png

 

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

@v-xulin-mstf 


Thank you for your reply.

 

I have already applied these steps, but the question is:

 

How can I add the file creation date to the table "newfile1" after expending it?

 

Every week I am receiving two CSV files to be added in Power BI, but instead of adding a custom column with the upload date every week, I want to automate this process, once the file is added to the power bi folder an extra column is then generated with the upload date of the file.

 

Further, let say you have 1 CSV file which gets updated every week, how can I add an incremental upload date to the table after refreshing? So I know which rows are added weekly to the table.

 

I hope you get what I mean 🙂 

Hi @Hicham-as4,

 

Add to the above:

Expand content:

vxulinmstf_0-1624526229440.png

Reserved the 'Date created' column.(Return to selected step and remove other steps)

vxulinmstf_1-1624526294797.png

vxulinmstf_2-1624526316558.png

Remove column 'Content', and expand table.

vxulinmstf_3-1624526402062.png

Then you can refresh data after add new file.

 

If you still have some question, please don't hesitate to let me known.‌‌

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

 

 

 

View solution in original post

lbendlin
Super User III
Super User III

Great.  Maybe you can show a sanitized version of your Power Query code?

lbendlin
Super User III
Super User III

In Power Query use the Folder connector (rather than connecting to an individual file).  That will then pull in the file names too.

I did that already!

lbendlin
Super User III
Super User III

Usually what you do in such a scenario is to include the source file name in your Power Query steps, which in turn likely has your date stamp as part of the name.

How!?

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Top Solution Authors
Top Kudoed Authors