Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
I have a dataset that uses Direct Query. I have a timestamp column and I am trying to add another column that will show the local time of that column for differnt users based on the selection from the slicer (which contains the list of countries). The new column should show the timezone based on the slicer list but I am not getting the right timezone.
I managed to connect to a timezonedb that will give me a list of offset for different timezones based on this article in this link: https://whitepages.tygraph.com/2020/10/dynamic-time-zone-conversion-using-power-bi/
This is what I have tried:
Start Timestamp | selected_offset | local_time |
04/13/2022 2:38 | 0.333333333 | 04/13/2022 10:38 |
04/13/2022 2:37 | 0.333333333 | 04/13/2022 10:37 |
04/13/2022 2:37 | 0.333333333 | 04/13/2022 10:37 |
Please let me know how to get the correct date time for local_time column based on slicer selection. Most solutions I found offer solution in Power Query which is something I cannot use at the moment due to DQ I am using for this dataset. Thanks!
Solved! Go to Solution.
Hi @Anonymous ,
Please use the measure rather than calculated column.
local_time = MAX ( 'Table'[Start Timestamp] ) + MAX ( global_timezone[offset_days] )
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please use the measure rather than calculated column.
local_time = MAX ( 'Table'[Start Timestamp] ) + MAX ( global_timezone[offset_days] )
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.