Forum Discussion

AgoZ_KH's avatar
AgoZ_KH
Resolver I
5 years ago
Solved

Last Report refresh date VS last Dataset refresh planned date (success)

Hi to all community! I have read many articles about the way to solve the problem how to show in a report the last refresh date. And of course this functions well. The only problem is that that Date...
  • Migasuke's avatar
    Migasuke
    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.