Forum Discussion

PPStar's avatar
PPStar
Helper V
2 years ago
Solved

Last Refresh Date in PowerBi

Hi, I have a Dataflow in Power BI Service. 

 

I have added a new column to my dataflow which is 

 

DateTime.LocalNow() as a DateTime type. 

 

The aim is that whenever a refresh happens, this datetime changes.

 

However, when it refreshes, the time is 1 hour behind.. 

 

When i connect to my powerbi report, its also showing one hour behind

 

So i customised the column to :

 

DateTime.LocalNow() + #duration(0,1,0,0)
 
Now, this added 1 hour to the date time. However, when i connect my power bi to the dataflow. It still showing 1 hour behind
 
What is happening here?. The regional setting on my power bi desktop (Current file) is set to English (United Kingdom) 
 
Basically, i need the last refresh date time as a column and it needs to consider the time changes. 
 
Thanks 
  • Anonymous's avatar
    Anonymous
    2 years ago

    PPStar  You can use some simple API calls like what I have done in the attached .pbix. Remember though, the visualizations will still need to be refreshed aven after the dataflow and report refreshes.

     

     

     

     

8 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    PPStar  So you're bringing in the MIN or MAX date from your dataflow into a card visualization? Are there unique dates in that column? What is your time in UTC? When you note that the column needs to consider time changes, are you referring to DST?

     

     

    • PPStar's avatar
      PPStar
      Helper V

      I just want a date that shows the last refresh of the dataflow.  The last refresh datetime column is a DateTime format. 

      It just going to be displayed as a Table in the report. 

      • PPStar's avatar
        PPStar
        Helper V

        For me, UTC time is -1. 

        I am on BST (British summer time), its 13:54 here now, so UTC is 12:54