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 ?
Hi Scottsen, thanks for your reply.
In the sales table, the date is just a date without time.
I have been thinking that maybe there is something else I need to put in the formula that will indicate that I want the sum of sales for the current month (May), something like today(), month()....
Because I keep getting blank as output and I do have sales in May in the sales table, the output should be something like 10k.
This is driving me nuts!
Thanks for the help.
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.
- Anonymous2 years agoNot applicable
Oh this makes so much sense now
Cheers!