Forum Discussion
Problem with DATESMTD
- Anonymous9 years ago
Your english is great!
*if* you calendar stopped at the end of May... this would work fine.
Ignoring that, you can add a calc column on your calendar table:
IsCurrentMonth = IF (MONTH(TODAY()) = MONTH(MyCalendar[Date]), TRUE(), FALSE())
Then set a filter on the card visual to IsCurrentMonth = TRUE ?
Ooohh!
MTD doesn't respect the current date at all. It's relative to the current filter context. If you go create a table w/ every day on it... you will see your measure working... growing the value each day, until end of month... when it resets to 1st day of month again.
You would need to do some sort of FILTER(ALL(Calendar), Calendar[Date] > TODAY() - DAY(TODAY()) + 1)
or probably easier to add a calc column to your calendar table IsCurrentMonth and use that to filter.
Oh this makes so much sense now
Cheers!