Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Problem with timezones

Hi, I have a KPI in my report that shows the latest refresh. The problem is that it changes when I publish it to the server, maybe is a problem with the timezone. This are the steps that I've done:

 

1. Power Query Script:

 

2. Power Query Result:

 

3. DAX

 

4. KPI result (Time is OK):

 

5. Server: The tooltip with Data updated is showing the right time, but the KPI in the report has +3 hours.

 

Also, the timezone of the Dataset is OK:

 

 

What can I do to fix this?

 

Thanks

 

  • Anonymous's avatar
    Anonymous
    5 years ago
    Solution in Power Query;
    Source = DateTimeZone.SwitchZone(DateTimeZone.FixedUtcNow(), -4), #"Converted to Table" = #table(1, {{Source}}), #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "LastRefreshDate"}}), #"Added Custom" = Table.AddColumn(#"Renamed Columns", "AsOf", each "As of "&DateTimeZone.ToText([LastRefreshDate], "MM/dd/yyyy hh:mmtt")),

    Show less

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks but I can't find that section. Where is it supposed to be in the Power BI Service?

  • Anonymous's avatar
    Anonymous
    Not applicable
    Solution in Power Query;
    Source = DateTimeZone.SwitchZone(DateTimeZone.FixedUtcNow(), -4), #"Converted to Table" = #table(1, {{Source}}), #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "LastRefreshDate"}}), #"Added Custom" = Table.AddColumn(#"Renamed Columns", "AsOf", each "As of "&DateTimeZone.ToText([LastRefreshDate], "MM/dd/yyyy hh:mmtt")),

    Show less