Forum Discussion
Time Zone Conversion Issue in Power Query and Power BI
- 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.
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.