Forum Discussion
carlos1945
May 14, 2020Copper Contributor
TOTAL of the month (just)
Hi Community,
I need to have the all of the spending corresponding for the current month. I have tried TOTALMTD and DATESMTD but in the last case it added until last row, even if it's in the different month. But i'm just looking for a function that sums spending in this month and that updated as the calendar evolves.
There are any function for that?
5 Replies
- SergeiBaklanDiamond Contributor
It shall work
ValueMTD:=CALCULATE(SUM(Table1[Value]),DATESMTD('Calendar'[Date]))if you have correct relationship with Calendar
- carlos1945Copper ContributorThank you very mutch
- The best thing to do is to use PivotTable for your dataset
- carlos1945Copper ContributorYes i know some ways to reach the goal, using IF measures. But i thought there might be some function DAX more direct to get the goal.
But It's ok. Thanks for your help
- peteryac60Iron Contributor
You could add an extra column (maybe hide it if you want) where you show the month by using MONTH(Date).
You can them use SUMIFS and check the MONTH column.
Another possibility - depending on your data it may be easier to use a pivot table?
Hope this helps.
Peter