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
ksahin
Regular Visitor

PowerBI Service - Information last Database call 2 hours early

Hi PowerBi Community,

 

i created a table in my PowerBI Report with PowerBi Desktop, which only shows the date and time, when the data was last pulled from the database.

 

The date-value is in a table "man_lastRefreshDate" that I previously created in Power Query using the "Enter data" option. To do this, I use the following expression and convert it into a table in PowerQuery.

 DateTime.LocalNow()

 

This field is then also displayed as a card visual on my dashboard.

 

Now my problem is that i update my Dashboard every day on 11pm (Query-update settings in powerbi Service) via Gateway on a Server. and after the auto-update, there is a  deviation of 2 hours. What could be the problem, the SQL-Server runs on Timezone UTC+1, the Query-update settings in PowerBi Service is also on UTC+1. 

Am I missing something?

 

Best Regards Folks and many thanks in advance

 

1 ACCEPTED SOLUTION
collinq
Super User
Super User

Hey @ksahin ,

 

The command for DateTime.LocalNow() is based on the time of the machine running the refresh.  So, if you are on the Service, this could be a timezone other than your own.   In the Service, this is almost always UTC.  There are a few common ways around this.

 

Radacad has an example of how to fix this here:

Solving DAX Time Zone Issue in Power BI - RADACAD

Solved: Re: display date/times in local timezone rather th... - Microsoft Fabric Community

Showing Current Time and Latest Refresh Time at Local Timezones in the Power BI Report - RADACAD

 

 




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




View solution in original post

1 REPLY 1
collinq
Super User
Super User

Hey @ksahin ,

 

The command for DateTime.LocalNow() is based on the time of the machine running the refresh.  So, if you are on the Service, this could be a timezone other than your own.   In the Service, this is almost always UTC.  There are a few common ways around this.

 

Radacad has an example of how to fix this here:

Solving DAX Time Zone Issue in Power BI - RADACAD

Solved: Re: display date/times in local timezone rather th... - Microsoft Fabric Community

Showing Current Time and Latest Refresh Time at Local Timezones in the Power BI Report - RADACAD

 

 




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.