Forum Discussion
TotalMTD not working properly
Hi all,
I'm not sure if there's something staring me in the face here, but I have been playing around with some basic data trying to test a formula, and I encountered an issue with the TotalMTD function.
When using TotalMTD, the visual seems to return the number of units sold for the entire month of September, even though today is 24th Sept. I also tried = CALCULATE(SUM('Table'[Units Sold]),DATESMTD('Table'[Date])) and the figure once again sums up the units for the entire month? Am I missing something very obvious here?
2 Replies
- ThxAlotSuper User
Time intelligence functions often function in a counter-tuitive way; its calculation NEVER bases on real life date but evaluation context.
- Ashish_MathurSuper User
Hi,
Assuming you have a Calendar Table with calculated column formulas for Year, Month name and Month number. ensure that the Month name is sorted by the Month number. To your visual, drag Year and Month name from the Calendar Table. Write this measure
Measure = calculate(sum(Table[Units sold]),datesbetween(calendar[Date],min(calendar[date]),today()))
Hope this helps.