Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AliceW
Impactful Individual
Impactful Individual

How to include the 'Latest Refresh' date and time in a report?

Hi folks,

 

Can anybody advise on this, please?

 

I've seen a thread using this formula: = DateTime.Time(DateTime.LocalNow()) & DateTime.Date(DateTime.LocalNow())

 

but for the life of me I can't figure out how to use it. How to create this table?

 

Big thanks,

 

Alice

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

In the main PowerBI window, in the Home ribbon:

Get Data => Blank Query

 

A new window should open (Query Editor), within that window go to the Home ribbon then Advanced Editor

A new window will open with the code like this

let
    Source = ""
in
    Source

replace it with the one I posted before, click Done, then Close & Apply



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

6 REPLIES 6
Stachu
Community Champion
Community Champion

you can create a new table in M, that when loaded to the model will give you the refresh time, e.g. like this

let
    Source = #table({"Last refresh"}, {{DateTime.Time(DateTime.LocalNow()) & DateTime.Date(DateTime.LocalNow())}}),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Last refresh", type datetime}})
in
    #"Changed Type"


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

AliceW
Impactful Individual
Impactful Individual

Hi Stachu,

 

How do I create that table? Do I use the 'Enter Data' button? Where do I enter the formula you've provided?

 

Thanks!!

AliceW
Impactful Individual
Impactful Individual

I've also tried 'New table' in the Modelling tab, but I get an error

Stachu
Community Champion
Community Champion

In the main PowerBI window, in the Home ribbon:

Get Data => Blank Query

 

A new window should open (Query Editor), within that window go to the Home ribbon then Advanced Editor

A new window will open with the code like this

let
    Source = ""
in
    Source

replace it with the one I posted before, click Done, then Close & Apply



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

AliceW
Impactful Individual
Impactful Individual

I've missed the part about 'Advanced Editor'. It works!!! Thank you so much!

Stachu
Community Champion
Community Champion

glad to hear that 🙂



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.