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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
AliceW
Power Participant
Power Participant

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
Power Participant
Power Participant

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
Power Participant
Power Participant

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
Power Participant
Power Participant

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
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors