Forum Discussion
Luiggo07
3 years agoFrequent Visitor
Time Zone Conversion Issue in Power Query and Power BI
I encountered an issue with time zone conversion in Power Query and Power BI, and I would appreciate some guidance from the community. Here are the details: Formula Used: DateTimeZone.RemoveZon...
- 3 years ago
Good day Luiggo07
"ToLocal" depends on the timezone where the query is executed. When executed on your desktop it will be the timezone configured for your desktop. When executed on Power BI Service it will be the timezone your Service sits in (e.g. your Service may be hosted in North America, Western Europe etc). When you first publish to the Service the data will be loaded from your desktop and be the same as was on your desktop but when refreshed in the Service, "Local" will be the local of the Service and so may give a different answer.
If the objective is to remove 6 hours from each datetime then you could use,
= Table.TransformColumns(
#"Previous Step",
{ {"Date-time", each _ -#duration( 0, 6, 0, 0 ) } }
)where "Previous Step" is the name of your previous step and Date-time is the name of your datetime column.
Hope this helps.