Forum Discussion

Tripp's avatar
Tripp
Frequent Visitor
7 years ago
Solved

British Summer Time

Hi there, 

 

I recently found some code to help navigate around British Summer Time and after some alterations, the code works great. The code checks to see if the date is between the last Sunday in March and October to return True or False.

 

When I try to remove the last section that refers to the Year I get an #error so I'm trying to figure out why this is the case as the year (at least to me) is not important and I can't see how it is affecting the output. 

 

So why can I not remove the year statement at the end?

 

IsBST = Table1[Date] >= MAXX(FILTER(Table1, Table1[Date].[MonthNo] = 3 && weekday(Table1[Date],2) && Table1[Date].[Year] = EARLIER(Table1[Date].[Year])),Table1[Date]) &&
        Table1[Date] <= MAXX(FILTER(Table1, Table1[Date].[MonthNo] = 10 && weekday(Table1[Date],2) && Table1[Date].[Year] = EARLIER(Table1[Date].[Year])), Table1[Date])

 

Cheers

1 Reply