Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Convert to local time - DAX

Hi all, I have 2 tables

1.) GMT table

2.) Master table

I would like to convert the "Time" of the table to the local time. However, PowerQuery seems not to be a feasible soluction since it is not supported by direct query, hence, Im looking for a simple way from DAX.

 

Thanks so much if there is an efficient way to get the Desired local time value.

MarketGMT Offset
Hong Kong8
Korea9
Australia10
Taiwan8

 

MarketReport Time(GMT+0)Desired local time
Australia2/28/2022 8:052/28/2022 18:05
Taiwan2/28/2022 8:052/28/2022 16:05
Taiwan2/28/2022 8:052/28/2022 16:05
Australia2/28/2022 8:052/28/2022 18:05
Korea2/28/2022 8:052/28/2022 17:05
Hong Kong2/28/2022 8:052/28/2022 16:05
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    Please try:

    Column = [Report Time(GMT+0)]+LOOKUPVALUE(Table1[GMT Offset],[Market],[Market])/24

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.