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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.