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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Calculated date wrong on Power BI Server

I have a "Last Refresh Date" field in my report that is populated from a manual query:

let
Source = #table(type table[LastRefresh=datetime], {{DateTime.LocalNow()}})
in
Source

 

When I run it locally in PowerBI Desktop it works fine. When I publish it to the on-premises report server, the date is wrong. I have confirmed the report regional settings are set to Australia. I have confirmed the report and database servers regional settings are set to Australia. I have confirmed that the date/time on the servers are correct.

 

This report is scheduled to run every hour. When I look at the schedule in the "Manage" screen, the date and time are showing correctly:

 

Report details:

Report_RefreshDateTime.png

 

Schedule details:

Schedule_RefreshDateTime.png

Both screenshots were taken within 1 minute of each other, and I refreshed the report to make sure it was displaying the current details.

 

I am running the October version of the Power BI Server.

 

Anyone have any ideas?

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

Based on my test, the DateTime.LocalNow() function will display in UTC time ignore the local region setting. So the report data is different from schedule refresh time. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Grumelo
Advocate II
Advocate II

I had the same issue, date refreshed in Power Bi Desktop is not the same once calculate in Report Server Schedule Refresh.

 

I've solved the problem by adding my timezone

 

let
    Source = #table(type table[LastRefresh=datetime], {{DateTime.LocalNow()}}),
    #"LocalDateTime" = Table.AddColumn(Source, "LastRefeshLocal", each DateTime.AddZone([LastRefresh],1), type datetimezone)
in
    #"LocalDateTime"

Anonymous
Not applicable

That works great, thanks very much 🙂

 

I'll just need to remember to adjust when daylight savings ends.

v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

Based on my test, the DateTime.LocalNow() function will display in UTC time ignore the local region setting. So the report data is different from schedule refresh time. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 years after - DateTime.LocalNow() still doesn't show correct time even on Power BI Desktop :((

Anonymous
Not applicable

It's weird that the function displays the local time in the desktop program but not on the server. I know the web version is different, but I figured the server would function the same as the desktop software and use the regional settings (like the now() function in SSRS does). Especially since it is called "LocalNow" not "UTCNow".

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.