last refreshed time in powerbi service

  • last refreshed time in powerbi service

    Posted by DSC Communities on October 22, 2022 at 2:07 pm
    • Jawaher kh

      Member

      October 22, 2022 at 2:07 PM

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

      Ā 

      let
      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”}})
      in
      #”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
      ——————————

    DSC Communities replied 3 years, 5 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘last refreshed time in powerbi service’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!