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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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