Forum Discussion
Last Data refresh Date
- 1 year ago
In power query, you create a new blank query, then you click on advanced editor in the home ribbon and you paste this code instead of the source one:
let Source = DateTime.LocalNow() in SourceThen you just have to convert it to a table:
Rename the query with something like LastRereshDate, close and apply and now, you are able to get the last refresh date in your report
If you prefer, you can also create a table in DAX and use the NOW() function but you have to create a calculated column, if you use it with a measure, each time you open the report, the date will be updated
- 1 year ago
Create a blank query with the following script.
let Source = DateTimeZone.SwitchZone(DateTimeZone.UtcNow(),8), #"Converted to Table" = #table(1, {{Source}}), #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Date"}}), #"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Date", type datetime}}) in #"Changed Type"Replace 8 with your actual GMT offset. My timezone is GMT+8. This approach takes into consideration that you will be refreshing the semantic model in the service which uses GMT and thus the need to to use DateTimeZone.UtcNow() and then convert it to the local timezone. Please note that Power BI doesn't have a built-in function to check for daylight savings.
If you're referring to when your data itself upon refresh, it depends on the data source. You can use the latest timestamps in the data or if flat files saved in sharepoint the creation or modified date.
Hi Manikanta2108,
We would like to follow up and see whether the details we shared have resolved your problem.
If you need any more assistance, please feel free to connect with the Microsoft Fabric community.
Thank you.