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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Frixel
Post Prodigy
Post Prodigy

Refresh DateTime not always works

Hi all,

 

I have a problem that not alway`s the last refresh datetime is vissible in my power bi service visual.(but well in refresh settings)

 

Let me show you:

 

►►This is the messure i have in the Power Bi desktop.

 

Frixel_3-1626941620897.png

 

 

 ►►Power Automate trigger every hour to refresh the Power Bi service report.(thats works)

 

Frixel_0-1626941103479.png

 

 

 ►►Also when i then look in Power Bi service => settings and by history refresh i see that also the model is well refresh every hour.

 

Frixel_1-1626941254705.png

 

►► But when i then update/refresh the service report there is NOT show the last refersh.

 

Frixel_0-1626945650385.png

 

 

What do i wrong?😂

EDIT:
I see now that i think that the refresh is oke but that the time is not right.

It is 2 hours in the past alway`s, so for Amsterdam it must be +2 hours.

 

EDIT2:
I changed the settings in power bi desktop like this now. Is that the right way?

Frixel_0-1626946997168.png

 

Now i see the right time.


 

1 ACCEPTED SOLUTION

@Frixel ,

 

you can also try the following API call.

Showing Specific Timezones in Power BI Service (Last Refreshed Time)

https://youtu.be/2kmFfbOeFJg

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

12 REPLIES 12
Frixel
Post Prodigy
Post Prodigy

@mwegener 

 

That's too bad that is is not to change in the service. i will use it in various reports...

and when you let the .LocalNow() away from the formule 'DateTime.LocalNow() as datetime' coul`d  that be a solution?  

Hi @Frixel 

Unfortunately no, you would need something with which you can specify the desired time zone.

What is your data source?

You could e.g. query the correct time from the SQL server.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hi @mwegener 

The data source are mostly from .xls and .csv sheets from OneDrive

 

@Frixel ,

 

you can also try the following API call.

Showing Specific Timezones in Power BI Service (Last Refreshed Time)

https://youtu.be/2kmFfbOeFJg

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hi @mwegener 

 

YES, this is the solution for me.

it`s simply and word perfect.

Thanks for your help.

Hi @Frixel .

 

you would need something like this for your time zone.

https://p3adaptive.com/2019/01/dst-refresh-date-function-power-bi-service/

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


amitchandak
Super User
Super User

@Frixel , seem like you already resolved it

@amitchandak 

 

Yes, but is it the right way?

@Frixel , to me it seems right. But let us check with other experts

 

@mwegener , Any comments on settings?

Hi @Frixel , @amitchandak ,

 

as far as I know the function DateTime.LocalNow() in the service determines the UTC time. In Power BI Desktop you get your local time zone.
I have not yet found a satisfactory way to display this correctly in the service.
The model language refers to the semantic model, but the cause of this problem lies in the data preparation by Power Query.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hi @mwegener 

 

I thought i have the right time in the service. It is so when i publish the report from desktop to service then i have the right time.

But when the report in service refresh (schedule or power automate trigger)  then the time is again in the past.

 

If i understand you right then that is a issue of the service version and is not to solve by my as a noob?

Hi @Frixel ,

 

at the time you deploy the report from the desktop to the servicer, the report still contains the data obtained on your local machine (local time zone). When the report is updated for the first time in the service, it determines the data in the service (UTC time zone).

 

https://docs.microsoft.com/en-us/powerquery-m/datetime-localnow
DateTime.LocalNow() as datetime
Returns a datetime value set to the current date and time on the system.

 

You would have to convert the UTC time to your time zone, which is not easy due to the daylight-saving time.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.