Forum Discussion

NewbieJono's avatar
NewbieJono
Post Partisan
2 years ago

Bank holiday Table Issue

Hello, i have the following code to label the first weekday number as 1 after a bank holiday.

 

This works fine, however I would like my bank holiday table to have an addition column stating the type of holiday. when I add the ocloumn, this code stops work.

 

for some reason, it only allows the bank holiday table to be one coloumn.

 

 

Working Weekday Column = 
    VAR __Date = [Date]
    VAR __WeekNum = WEEKNUM(__Date,2)
    VAR __Table = 
        FILTER(
            ADDCOLUMNS( EXCEPT(CALENDAR( __Date - 7, __Date + 7), 'DIM - Bank Holidays'), "__WeekNum", WEEKNUM([Date],2) ),
            [__WeekNum] = __WeekNum && [Date] <= __Date
        )
    VAR __Result = COUNTROWS(__Table)
RETURN
    __Result

 

1 Reply