I have a slice that filters for all activity created last month. Normally it works, however, this month โJanuaryโ, its picking up last month โDecember 2020โ but also December โ2019โ. How do I include month/year? My slice expression is below:
AND(MONTH([Created Date]) = MONTH(EOMONTH(TODAY(), -1))
AND(
[Created Date] <= EOMONTH(TODAY(), -1) ,
[Created Date] > EOMONTH(TODAY(), -2)
)
For reference:
Whatโs confusing is that I had EOMONTH - 1 which should be Jan 2021 - one month = Dec 2020 but, instead, it was just calculating that last month was December and, thus, including Dec 2019. Marcโs expression works though. Thanks Marc!
EOMONTH outputs a Date type, not a month. Dates include the year. But then you wrapped it in MONTH(), which just outputs a number 1 through 12, thus stripping the year off.
MONTH() of any Date in Dec 2020 equals 12. Same for any Date in Dec 2019, or 2018, etc.
Oh yeah, not sure why I did that. Thanks for clarifying!
User | Count |
---|---|
42 | |
29 | |
25 | |
23 | |
13 |