Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi community,
Hope that every is doing well.
I need your help.
I want to get the value of a date/time to add the UTC time which corresponds to the UTC I want. However when I use these options, I don't get the result that I want.
And when I publish the report, the function below doesn't work, the issue is from Power BI Service, it doesnt' take it. I see many forums talked about, but I don't see the good results.
= Table.AddColumn(#"Type modifié1", "CAL_START_DATETIME_ZONE_UTC_PARIS", each DateTimeZone.From([subtaskDetails.details.tasks.startTime],"fr-FR"))
= Table.AddColumn(#"Personnalisée ajoutée3", "Test_AddZone", each DateTime.AddZone([startTime],1,0))
I get :
How can get the equivalent the starTime in my Zone UTC or really add 1 hour to my startTime instead add as visuel, I would like to get if starTime is ?
17/12/2024 07:11:04 |
17/12/2024 08:11:04 |
Thanks in advance.
Solved! Go to Solution.
Hi, @Nikita4More
Thanks for reaching out to the Microsoft fabric community forum.
The issue you are encountering is indeed a limitation of the Power BI service: currently, the Power BI service only supports UTC date and time.
If you need to adjust the time by adding an hour in Power Query, you can try the following steps:
1.Firstly, it is recommended to determine your current time zone. When you use the DateTime.AddZone function, it will automatically add your time zone to the value, and then modify it according to the value you provide. Since I am currently in the +8 time zone, I will use my time zone as an example.
2.My sample data is 10 AM:
3.When I set it to 0, it actually returns 6 PM, which corresponds to the +8 time zone:
4.Therefore, we need to set it to 7, and the returned result will be what we need:
You may need to ensure that the data type is changed to date/time:
5.Below is the result in Desktop:
6.Below is the result in Service:
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I do thank you @Anonymous for your answer and your invest.
Best regards,
Nikita4More
I do thank you @Anonymous for your answer and your invest.
Best regards,
Nikita4More
Hi, @Nikita4More
Thanks for reaching out to the Microsoft fabric community forum.
The issue you are encountering is indeed a limitation of the Power BI service: currently, the Power BI service only supports UTC date and time.
If you need to adjust the time by adding an hour in Power Query, you can try the following steps:
1.Firstly, it is recommended to determine your current time zone. When you use the DateTime.AddZone function, it will automatically add your time zone to the value, and then modify it according to the value you provide. Since I am currently in the +8 time zone, I will use my time zone as an example.
2.My sample data is 10 AM:
3.When I set it to 0, it actually returns 6 PM, which corresponds to the +8 time zone:
4.Therefore, we need to set it to 7, and the returned result will be what we need:
You may need to ensure that the data type is changed to date/time:
5.Below is the result in Desktop:
6.Below is the result in Service:
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
84 | |
76 | |
75 | |
43 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
43 |