Forum Discussion
Date 1 day behind source date
- 5 years ago
Cul33 - Smells like a timezone problem but hard to say. I suppose you either need to track down the discrepency in the date/time setting. Dublin is +1 UTC so that's almost assuredly where your issue is coming into play. The time is some date at 12 AM, you subtract an hour and it is the previous day.
So, your options are probably to track down the source of who is assuming UTC (probably Power Query/Power BI) and make it see reason, or you could fix it with a calculated column. In Power Query that would be:
Date.AddDays([Column1],1)In DAX:
[Column1]+1
Cul33 - Smells like a timezone problem but hard to say. I suppose you either need to track down the discrepency in the date/time setting. Dublin is +1 UTC so that's almost assuredly where your issue is coming into play. The time is some date at 12 AM, you subtract an hour and it is the previous day.
So, your options are probably to track down the source of who is assuming UTC (probably Power Query/Power BI) and make it see reason, or you could fix it with a calculated column. In Power Query that would be:
Date.AddDays([Column1],1)
In DAX:
[Column1]+1
Many thanks for your feedback Greg_Deckler.
Although unclear why if the time zones match in SharePoint and Power BI, I can use this as a workaround - although it occurred to me that if in the future it is "fixed", my dates could end up being 1 day ahead!
As well as Greg's method, I tried the method described in the Curbal video, where Order Date is the date field, and having set the type to be date time, =DateTime.From(["Order Date"])+#duration(1,0,0,0). This also worked.
I have alot of date fields, so will copy & paste them in the query editor then change the field names to speed it up.