Forum Discussion
Last Report refresh date VS last Dataset refresh planned date (success)
- 5 years ago
Hi AgoZ_KH ,
You should not use FixedUtcNow (as described in documentation:
Returns the current date and time in UTC (the GMT timezone). This value is fixed and will not change with successive calls.)
I ve just tested following Query in PBI Service and works perfectly (you can simply copy paste it):let Source = DateTimeZone.UtcNow(), #"Converted to Table" = #table(1, {{Source}}), #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "UTC Now"}}), #"Added Custom" = Table.AddColumn(#"Renamed Columns", "UTC +2", each DateTimeZone.SwitchZone([UTC Now],+2)) in #"Added Custom"The standard DateTimeZone.UtcNow() should solve your problem.
Hi AgoZ_KH ,
If I uderstand well - you would like to see last refresh in PBI Service, but the time is showed based on PBI server. Because of that, you would like to try other path with API. Is that correct?
If yes, then you can easily use function in PQ of DateTimeZone.UtcNow(). You can create for example simple column with this date and based on this column create a dynamic tile in your report. Advantage of this functin is, that it will always show the UTC time, and eventually you can move it to your wished time zone (I think function DateTimeZone.SwitchZone is the right).
Let me know, if that helps.
- AgoZ_KH5 years ago
Resolver I
Hi Migasuke ! Thanks for the reply and Yes this is what I want to obtain: the date and hour of the schedule refresh of the dataset (in my case every day at 05:00 AM).
I tried actualy to use PQ with this query: =DateTimeZone.SwitchZone(DateTimeZone.FixedUtcNow(),+2); but the risult is that when I access from the link of the pBI service instead of the date/time equal to 05:14:44 I see 16:07:41.
But now I have the doubt that this IS the real last refresh date/time for the report for a on demand refresh operation made by the pBI desktop! I'm a little in confusion on the issue!! 🤔
Agoz
- Migasuke5 years ago
Memorable Member
Hi AgoZ_KH ,
You should not use FixedUtcNow (as described in documentation:
Returns the current date and time in UTC (the GMT timezone). This value is fixed and will not change with successive calls.)
I ve just tested following Query in PBI Service and works perfectly (you can simply copy paste it):let Source = DateTimeZone.UtcNow(), #"Converted to Table" = #table(1, {{Source}}), #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "UTC Now"}}), #"Added Custom" = Table.AddColumn(#"Renamed Columns", "UTC +2", each DateTimeZone.SwitchZone([UTC Now],+2)) in #"Added Custom"The standard DateTimeZone.UtcNow() should solve your problem.