March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All,
I am facing an issue in which the date values from the sharepoint list is showing as one day before the actual date in powerbi service.
In order to solve that issue i've created a custom column , similar to the steps mentioned in this article:
https://cloudbi.com.au/converting-utc-to-local-datetime-in-power-bi/
these are the steps i've performed:
1) created a custom column using below code:
DateTimeZone.RemoveZone(DateTimeZone.SwitchZone([Project Start Date],5.30))
2) converted the type of the column to date
even after creating the custom column it is showing incorrect dates.. one day before in most cases..
faced similar issue earlier in another project. In that file as well i've created the same custom column.. and it was showing the correct date in service after schdule refresh.. only difference is that the date format of that column is general
and in the one i am facing this issue it is long date
does anyone know what is the issue?
Solved! Go to Solution.
Hi @WinterGarden , You must first identify the TimeZone which is followed for populating Project Start Date. Based on the time difference you can tweak the m code of your custom column
If you notice about 7 hours and 30 mins difference consider below code
[Project Start Date] + #duration(0, 7, 30, 0)
If you find 1 day difference use the below one
[Project Start Date] + #duration(1, 0, 0, 0)
If you couldn't back track the timezone, consider manually tweaking the numbers inside #duration untill you get the correct date.
Did I answer your question ? Please mark my post as a solution
Thanks,
Jai
Hi @WinterGarden ,
Thanks to Jai-Rathinavel and shafiz_p for their quick replies. Did their replies help you resolve your issue? If so, please accept the helpful replies as solutions to help users with the same problem, and if not, please point them out.
Best Regards,
Neeko Tang
Hi @WinterGarden , You must first identify the TimeZone which is followed for populating Project Start Date. Based on the time difference you can tweak the m code of your custom column
If you notice about 7 hours and 30 mins difference consider below code
[Project Start Date] + #duration(0, 7, 30, 0)
If you find 1 day difference use the below one
[Project Start Date] + #duration(1, 0, 0, 0)
If you couldn't back track the timezone, consider manually tweaking the numbers inside #duration untill you get the correct date.
Did I answer your question ? Please mark my post as a solution
Thanks,
Jai
Hi @WinterGarden Instead of using DateTimeZone.RemoveZone, try using DateTimeZone.ToLocal to convert the time to your local time zone. For example:
DateTimeZone.ToLocal(DateTimeZone.SwitchZone([Project Start Date], 5.5))
Try converting the date to a standard format before applying the time zone conversion.
Verify the locale settings in Power BI Service. You can set the locale for your dataset in the Power BI Service settings to ensure it matches your local time zone.
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
32 | |
24 | |
12 | |
11 | |
9 |
User | Count |
---|---|
47 | |
46 | |
23 | |
12 | |
9 |