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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.