Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have a question in Power BI.
I am using an ODBC data source lnked directly to power BI, which has a column of date and time recorded in PST timezone.
Now I am looking to add a column in Power BI which shall have date and time converted from above said PST timezone to IST timezone.
For an example:
Column A has 07/05/2022 07:30:00 AM PST
I need In column B as 07/05/2022 08:00:00 PM IST
On the left, select the 'Power BI Analytics' tab.
On this page, select the 'Settings' tab at the top right.
On the page that appears, you'll see your current time zone listed.
A drop-down will appear where you can select a new time zone.
Click 'Save'.
Regards,
J Wick
I am using power bi desktop and I don't see On the left, select the 'Power BI Analytics' tab
Thanks for your help.
Hi @Sunil0741,
No, for DirectQuery mode, considering the performance, complex calculations cannot be used. This is a limitation of directquery.
You can try Import mode for ODBC.
Or, you can try the something like the following screenshot.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you. I tried adding 12 hours 30 minutes but it vary during daylight saving as 13 hours 30 minutes.
That is where I am looking to convert date and time considering daylight saving.
Hi @Sunil0741 ,
Or try use IF statement to identify date?
Like this:
ist =
VAR _selecteddate =
SELECTEDVALUE ( datetime_table[datetime] )
VAR _selecteddateYear =
YEAR ( _selecteddate )
VAR _start =
DATE ( _selecteddateYear, 3, 1 ) + 7
- WEEKDAY ( DATE ( _selecteddateYear, 3, 1 ), 2 ) + 7
VAR _end =
DATE ( _selecteddateYear, 11, 1 ) + 7
- WEEKDAY ( DATE ( _selecteddateYear, 11, 1 ), 2 )
RETURN
IF (
_selecteddate >= _start
&& _selecteddate <= _end,
_selecteddate + TIME ( 13, 30, 0 ),
_selecteddate + TIME ( 12, 30, 0 )
)
Result:
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Sunil0741 , refer if DateTimeZone.SwitchZone, can help
https://docs.microsoft.com/en-us/powerquery-m/datetimezone-switchzone
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |