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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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 @Anonymous,

 

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 @Anonymous,

 

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!

Anonymous
Not applicable

@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 @Anonymous,

 

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!

 

 

 

lbendlin
Super User
Super User

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

lbendlin
Super User
Super User

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

Anonymous
Not applicable

I did that already!

lbendlin
Super User
Super User

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.

Anonymous
Not applicable

How!?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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