Forum Discussion

MojoGene's avatar
MojoGene
Post Patron
8 years ago
Solved

Show date last saved for excel file source?

One of the data sources in my data model is an Excel workbook. I would like to display the date that the Excel workbook was last saved. Is there an easy way to do this?
  • fhill's avatar
    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
    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.