Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

time zone conversion UTC to local time

Hi,

 

Request your guidance regarding subject matter, am using below mentioned custom column formula to convert UTC to local time, will it work in PBI Service

 

currently am using desktop version

 

regards,

 

dsmitha

  • This won't work in Power BI service as service is based on UTC and for it, local time zone is UTC. 

    The way out is use following type of construct

     

    = DateTimeZone.SwitchZone(DateTimeZone.UtcNow(),5,30)

     

    Where 530 is user's time zone. But this is helpful only if all users are based in +0530 time zone. Hence, if somebody is based in say +0200 time zone, his time will be off by 0330. 

    If users are in multi time zones, it is better to leave it at UTC only which will be common for all.

    Having said above, this thread discusses many possible solutions which has worked for some and have not worked for some. Hence worth exploring for you if above solution is not useful to you (as I said it may work and may not work for you but have a shot) - https://community.powerbi.com/t5/Service/Set-local-time-zone-Power-BI-Service/m-p/114120 

2 Replies

  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    Most Valuable Professional

    This won't work in Power BI service as service is based on UTC and for it, local time zone is UTC. 

    The way out is use following type of construct

     

    = DateTimeZone.SwitchZone(DateTimeZone.UtcNow(),5,30)

     

    Where 530 is user's time zone. But this is helpful only if all users are based in +0530 time zone. Hence, if somebody is based in say +0200 time zone, his time will be off by 0330. 

    If users are in multi time zones, it is better to leave it at UTC only which will be common for all.

    Having said above, this thread discusses many possible solutions which has worked for some and have not worked for some. Hence worth exploring for you if above solution is not useful to you (as I said it may work and may not work for you but have a shot) - https://community.powerbi.com/t5/Service/Set-local-time-zone-Power-BI-Service/m-p/114120 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Vijay_A_Verma,

      Thank you for clarifying the doubt.  As you said it will be better to leave in UTC

       

      Also, thank you for sharing the link

       

      regards,

      dsmitha