Forum Discussion
NewbieJono
2 years agoPost Partisan
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
- AnonymousNot applicable
Hi NewbieJono ,
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng