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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors