 # This week filter

Hi.

I have created a slice and I want my date filter to be MON - FRI of the current week. I have tried something like [Date]>=TODAY() - WEEKDAY(TODAY()) + 1. Does not seem to be working. Am I on the right track here?

Any help would be great, thank you.

Try:

AND(
WEEKNUM([Date])=WEEKNUM(Today()),
OR(
WEEKDAY(TODAY())=2,
WEEKDAY(TODAY())=3,
WEEKDAY(TODAY())=4,
WEEKDAY(TODAY())=5,
WEEKDAY(TODAY())=6
))

There are more elegant ways, but this is the easiest to understand Simon@1minManager.com

Many thanks for this @1minManager.

You would need to add the YEAR() as well. Otherwise it will give wrong result next year.

1 Like

@Aleksi, thank you for that.

Can I just ask how to incorporate that into the expression?

AND(
WEEKNUM([Date])=WEEKNUM(Today()),
YEAR([Date])=YEAR(TODAY()),
OR(
WEEKDAY(TODAY())=2,
WEEKDAY(TODAY())=3,
WEEKDAY(TODAY())=4,
WEEKDAY(TODAY())=5,
WEEKDAY(TODAY())=6
))

2 Likes

Thanks a million @Aleksi

Try:

``````AND(
([Date] >= (TODAY() - WEEKDAY(TODAY()) + 2)),
([Date] <= (TODAY() - WEEKDAY(TODAY()) + 6))
)
``````
4 Likes

Yes, you are correct… it doesn’t handle Dec/Jan transition. I didn’t think deeply enough Worked perfectly, thank you @Steve

1 Like