Help with Weeknum() Function

how to make the weknum function only read in that month
example if i put a [date] column are 10/2/2021 then the weeknum is 1 not 40

Solved Solved
0 5 261
1 ACCEPTED SOLUTION

Steve
Platinum 5
Platinum 5

Try this:

SWITCH(
  EOWEEK([date]),
  EOWEEK(EOMONTH([date], -1) + 1),
    1,
  EOWEEK(EOMONTH([date], -1) + 1 + 7),
    2,
  EOWEEK(EOMONTH([date], -1) + 1 + 14),
    3,
  EOWEEK(EOMONTH([date], -1) + 1 + 21),
    4,
  5
)

View solution in original post

5 REPLIES 5
Top Labels in this Space