Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only

last refreshed time in powerbi service

  • 1.  last refreshed time in powerbi service

    Bronze Contributor
    Posted Oct 22, 2022 02:07 PM

    I use the following script in powerquery in order to get the last refreshed time in CET 


    UTC_DateTimeZone = DateTimeZone.UtcNow(),
    UTC_Date = Date.From(UTC_DateTimeZone),
    StartSummerTime = Date.StartOfWeek(#date(Date.Year(UTC_Date), 3, 31), Day.Sunday),
    StartWinterTime = Date.StartOfWeek(#date(Date.Year(UTC_Date), 10, 31), Day.Sunday),
    UTC_Offset = if UTC_Date >= StartSummerTime and UTC_Date < StartWinterTime then 2 else 1,
    CET_Timezone = DateTimeZone.SwitchZone(UTC_DateTimeZone, UTC_Offset),
    #"Converted to Table" = #table(1, {{CET_Timezone}}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Converted to Table",{{"Column1", type datetime}}),
    #"Renamed Columns" = Table.RenameColumns(#"Changed Type1",{{"Column1", "Last refreshed date"}})
    #"Renamed Columns"


    The script is working fine in desktop, but in powerbi, it always showing time in UTC , how to change it please?


    Any help would be too much appreciated!

    Jawaher kh