Forum Discussion
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 week period, e.g. one file will be updated weekly whereas others are updated once every 4 weeks and others maybe once every 6 months.
As part of the dashboard i would like to be able to display the last time the query for each excel file was refreshed.
Every solution i have seen so far only shows how to diplay the refresh date/time for the entire model.
Is it possible to be done?
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"
1 Reply
- negi007Community Champion
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"