cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
avikkal89 Frequent Visitor
Frequent Visitor

Implementing Daylight Savings in Power BI

Hello Community, 

 

I have a scenario where the date column is in UTC. We have a DST flag which changes on 12am of second Sunday of March and first Sunday of November. (Currently the business scenario is that the DST flag changes at 12am and not 2am)
As you see, the DST flag changes to "1" at 3/11/1900 12:00:00.
I have a PST column with the following DAX
PST = IF(Sheet1[DST_Flag] = 0, 'Sheet1'[Date]-8/24, Sheet1[Date]-7/24) (ie; subtracts 8 hours when DST_flag= 0, else subtracts 7 hours)
Now, I would like to implement a logic (in DAX) where the PST time gets subtracted to -7 only when the PST time is 3/11/1900 12:00:00 and NOT when the UTC time is 12am. 

image.png

 

3 REPLIES 3
Super User IV
Super User IV

Re: Implementing Daylight Savings in Power BI

not clear what your question is, you have utc and you are calculating pst based on flag, are you saying you want to further substract 7 hours from pst if date is 3/11/1900

 

also your formula shows the colur name [Date] where as in your table image it is called [Date UTC]






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





avikkal89 Frequent Visitor
Frequent Visitor

Re: Implementing Daylight Savings in Power BI

@parry2k
[Date UTC] and [Date] are the same columns

The DST flag is currently implemented for UTC timings. However I am trying to get the equivalent PST for the respective UTC. 

For example, 
when the UTC date and time is - 03/10/1900 11PM, the equivalent PST is 3/10/1900 3pm (Subtracting 8 hours)
DST flag changes from 0 to 1t UTC timing 03/11/1900 12AM, at this point the PST shouldn't be 3/10/1900 5PM. The result we need here is 3/10/1900 4PM. 
Even though the DST flag gets into effect when UTC time changes to 12am, the equivalent time at PST is still in the previous day. This is the logic I am fail to implement. 

Kindly let me know if this was clear enough. 

Microsoft v-haibl-msft
Microsoft

Re: Implementing Daylight Savings in Power BI

@avikkal89

 

Could you please provide the expected results for PST column just like the Table screenshot you uploaded in the first post?

 

Best Regards,
Herbert

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors