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! Go to Solution.
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
)
So you want the week number of the month rather than of the year?
yes correct
Would this be the case of finding the weeknum of the 1st day of the same month and then subtracting the two?
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
)
it works. Thanks a lot
User | Count |
---|---|
43 | |
29 | |
25 | |
23 | |
13 |