Forum Discussion

manoj_0911's avatar
manoj_0911
Icon for Kudo Commander rankKudo Commander
1 year ago
Solved

Power BI Service Automatically Converts PST Date to UTC – How to Keep DB Date as PST?

Power BI Service Automatically Converts PST Date to UTC – How to Keep DB Date as PST?

 

Hi everyone,

 

I'm facing a timezone issue and would appreciate your help.

I’m pulling data into Power BI from a SQL Server database. The [TXN_DATE] column in the database is stored in Pacific Time (PST/PDT). I’ve confirmed with the DB team, and also verified from actual data values — it’s definitely not UTC.

my customers operate in the PST timezone, and I want the date/time to appear in local Pacific Time exactly as stored in the DB.

 

However, after I:

  • Load the data into Power BI Desktop (Transform Data view shows [TXN_DATE] as UTC),

  • Publish the report to Power BI Service,

…the datetime values seem to shift by 7 or 8 hours, depending on DST — as if Power BI is interpreting them as UTC and converting them to the browser/machine’s local time.


My Questions:

  1. How can I prevent Power BI Service from auto-converting the PST datetime to UTC or local browser time?

  2. Is there a way to explicitly tell Power BI that my datetime column is already in PST, and it should be kept that way?

  3. If Power BI always treats date/time as UTC by default, what is the best practice to retain PST in reports consistently between Desktop and Service?

Thanks in advance for your guidance!

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi manoj_0911 ,
    Thanks for reaching out to the Microsoft fabric community forum.

     
    Try these Steps to resolve your issue -

    Load into Power BI Desktop
    Create a new table in Power BI or connect to your SQL data source.
    Open the Transform Data option to access Power Query Editor.

    Apply UTC Conversion

    In Power Query, go to Add Column > Custom Column:
     

    DateTimeZone.SwitchZone(DateTimeZone.From([TXN_DATE]), -8)

    Rename this new column to TXN_DATE_UTC. This approach applies the PST offset. For daylight saving time (March–November), use -7 or -8.

    Before publishing it double-check  if the column is correctly typed in Power Query > Data Type for datetimezone.

     

    Test in Power BI Service
    Publish your report to Power BI Service.
    The TXN_DATE_UTC field will display the same as in Desktop, with no additional UTC adjustment.

    Since you’ve already adjusted to UTC, Power BI Service will keep the date consistent across environments.

    Please find the attached .pbix file for your reference. 

    If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it

    Best Regards,
    Sreeteja.
    Community Support Team

     

     

6 Replies

  • Hi manoj_0911 Power BI assumes datetime values are in UTC, leading to auto-conversion. To retain PST, transform the datetime in Power Query using DateTime.AddZone([TXN_DATE], -8) for standard time or adjust dynamically for DST. Use the DateTimeZone type to prevent further adjustments. Ensure visuals explicitly use the transformed column to retain consistency between Desktop and Service.

  • Hi manoj_0911  - adding few points , Power BI assumes datetime values are in UTC and converts them based on the service or browser’s local time.

    to retain:

    at power query editor, DateTime.AddZone([TXN_DATE], -8)

    Use the new DateTimeZone-typed column in visuals and calculations,Avoid using the original column that Power BI interprets as UTC. Hope this helps.

    reference Links:

    DateTimeZone functions - PowerQuery M | Microsoft Learn

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi manoj_0911 ,
    Thanks for reaching out to the Microsoft fabric community forum.

     
    Try these Steps to resolve your issue -

    Load into Power BI Desktop
    Create a new table in Power BI or connect to your SQL data source.
    Open the Transform Data option to access Power Query Editor.

    Apply UTC Conversion

    In Power Query, go to Add Column > Custom Column:
     

    DateTimeZone.SwitchZone(DateTimeZone.From([TXN_DATE]), -8)

    Rename this new column to TXN_DATE_UTC. This approach applies the PST offset. For daylight saving time (March–November), use -7 or -8.

    Before publishing it double-check  if the column is correctly typed in Power Query > Data Type for datetimezone.

     

    Test in Power BI Service
    Publish your report to Power BI Service.
    The TXN_DATE_UTC field will display the same as in Desktop, with no additional UTC adjustment.

    Since you’ve already adjusted to UTC, Power BI Service will keep the date consistent across environments.

    Please find the attached .pbix file for your reference. 

    If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it

    Best Regards,
    Sreeteja.
    Community Support Team

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi manoj_0911 
      May I ask if you have resolved this issue? If so, please mark the helpful reply and Accept it as the solution and give a 'Kudos'. This will be helpful for other community members who have similar problems to solve it faster.

       
      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi manoj_0911 ,

        I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you