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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Python Script to 'Get Data' from a 'Folder' and read the 'Last Modified' Date?

I am looking for someone to help me with a Python script to be able to load some folder data into a PowerBi dashboard, which gives me a table of the 'Last Modified' date/time.

 

So when I click 'Get Data' > 'From folder', I have an excel file which I have in this folder where the date and time of the 'last modified' date of a file is kept. This will be used to add a LAST REFRESHED 'card' to the dashboard so users know when it was last refreshed.

 

Can someone guide me how to do this using Python. For information - the dashboard is saved in a SharePoint. So the folder path currently looks like this: https://companyX.sharepoint.com/sites/Folder/Shared%20Documents/General/ExcelSpreadsheet.xlsx

1 REPLY 1
Jimmy801
Community Champion
Community Champion

Hello @Anonymous 

 

question: Why are you not using the simple build-in function Folder.Files?

Jimmy801_0-1602222938676.png

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

 

Helpful resources

Announcements
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.