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 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
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.