Forum Discussion

elpinto's avatar
elpinto
New Member
4 years ago
Solved

Refresh Dates for different queries

Hi I am currently building a report and am having to import various excel tables for the report from a sharepoint site.   Each of these excel files will be updated at different times during a 4 we...
  • negi007's avatar
    4 years ago

    elpinto in this case, you can add a refresh date time column to each of your table, whenever the data is refreshed in the table, it will show the latest date and time. You can then show that in your visual. Please refer to below link, you will need to modify the code for each table one time and then you will have refresh date time column in each table. I have also checked the code and it is working.

     

    Add last refresh date to a Power BI report - Azure DevOps | Microsoft Learn

     

     

     

    let
    Source = Excel.Workbook(File.Contents("C:\dddd\dddd\SuperStoreUS-2015.xlsx"), null, true),
    Orders_Sheet = Source{[Item="Orders",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Orders_Sheet, [PromoteAllScalars=true]),
    #"Added Refresh Date" = Table.AddColumn(#"Promoted Headers", "Refresh Date",
    each DateTimeZone.FixedUtcNow(), type datetimezone)
    in
    #"Added Refresh Date"