Forum Discussion
Show date last saved for excel file source?
- 8 years ago
In Query Editor select 'New Source' and 'Blank Query'. Next click Advanced Editor and past one of these options:
If you data is local or on a network share:
let
Source = Folder.Contents("c:\temp")
in
SourceIf you data is on a sharepoint or One Drive folder: (This one is easier if you go thru the Sharepoint option under Get Data - More, so PowerBI can record your credentials.)
let
Source = SharePoint.Files("https://<Org Name>.sharepoint.com/sites/<group Name>", [ApiVersion = 15])
in
SourceFilter the results as desired to get 'Date Accessed' for the file you need.
In Query Editor select 'New Source' and 'Blank Query'. Next click Advanced Editor and past one of these options:
If you data is local or on a network share:
let
Source = Folder.Contents("c:\temp")
in
Source
If you data is on a sharepoint or One Drive folder: (This one is easier if you go thru the Sharepoint option under Get Data - More, so PowerBI can record your credentials.)
let
Source = SharePoint.Files("https://<Org Name>.sharepoint.com/sites/<group Name>", [ApiVersion = 15])
in
Source
Filter the results as desired to get 'Date Accessed' for the file you need.
This is great information and useful but, unfortunately, with OneDrive and SharePoint the "Date last Saved" for the file does not always match the "Date Modified" date returned (and the file "Content Created" date rarely matches the "Date Created" returned).
Is there a way to get those two fields as well?
[Note: originally was not able to post screenshots to show what I am talking about]