Skip to main content

Timezones in Power BI Online

You might notice that times in your report look correct in Power BI Desktop but are shifted by one or more hours after publishing the report to Power BI Online. This page explains why this happens and how to set up your report so that the times shown in Power BI Online are correct.

Why times differ between Power BI Desktop and Power BI Online

The datetime columns provided by the Eduframe connector contain timezone information. When such a column is loaded, Power BI converts it to the timezone of the environment that refreshes the data:

  • Power BI Desktop runs in the timezone of your own device, so the times are converted to your local timezone and look correct.
  • Power BI Online always runs in UTC, regardless of where you or your organization is located. After a refresh in Power BI Online, the report therefore shows the UTC times instead of your local times.

Solution

To make sure the times are correct in Power BI Online, convert the datetime columns to your timezone explicitly in Power Query. This way the conversion no longer depends on the timezone of the environment that refreshes the data.

  1. In Power BI Desktop, go to Transform data to open the Power Query editor.
  2. Select the table containing the datetime column you want to convert, for example planned_course_meetings with the start_date_time column.
  3. Add a new step that adds a column with the converted time. In the Advanced Editor this step looks like this:
= Table.AddColumn(#"Changed Type1", "DutchStartDateTime", each DateTimeZone.RemoveZone(DateTimeZone.SwitchZone([start_date_time], 1)))

Alternatively, you can add a Custom Column and enter only the per-row formula in the dialog:

DateTimeZone.RemoveZone(DateTimeZone.SwitchZone([start_date_time], 1))
  1. Use this new column in your visuals instead of the original column.

The conversion itself is done by this part of the formula:

DateTimeZone.RemoveZone(DateTimeZone.SwitchZone([start_date_time], 1))
  • DateTimeZone.SwitchZone([start_date_time], 1) converts the value to the timezone with a +1 offset from UTC (the Dutch timezone).
  • DateTimeZone.RemoveZone(...) removes the timezone information from the value, so Power BI treats it as a plain local time and will not convert it again when the report is refreshed in Power BI Online.

Repeat these steps for every datetime column you use in your report.

note

Replace the 1 in the formula with the UTC offset of your own timezone. Note that this is a fixed offset: it does not automatically adjust for daylight saving time. For the Netherlands, 1 matches winter time (CET), while summer time (CEST) is 2.

Power Query has no built-in function to convert to a named timezone with automatic daylight saving time handling, so a fixed offset is the simplest reliable option. If you need automatic daylight saving time handling, you can write a custom Power Query function that calculates the offset based on the date (for example, for European timezones, using the last Sunday of March and the last Sunday of October as switching points).