Forum Discussion
toncib
7 years agoNew Member
TOTALMTD Not Working
I cannot get TOTALMTD to work. I need the MTD Scrap Pounds to be added up for the month, but it is just returning the lbs for each instance that day. Any help is appreicated.
Probably something along the lines of:
TITHW_TotalMTDHW = VAR __MaxYear = MAX('Years'[Year]) VAR __MaxMonth = MAX('Months'[MonthSort]) VAR __TmpTable = CALCULATETABLE('TheHardWay',ALL('Years'[Year]),All('Months'[Month])) RETURN SUMX(FILTER(__TmpTable,[Year]=__MaxYear && [MonthSort] = __MaxMonth),[Value])
3 Replies
- Greg_DecklerCommunity Champion
See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008- toncibNew Member
It might, but that is YTD and I'm not experienced enough to understand how to do this for the MTD that I need.
- Greg_DecklerCommunity Champion
Probably something along the lines of:
TITHW_TotalMTDHW = VAR __MaxYear = MAX('Years'[Year]) VAR __MaxMonth = MAX('Months'[MonthSort]) VAR __TmpTable = CALCULATETABLE('TheHardWay',ALL('Years'[Year]),All('Months'[Month])) RETURN SUMX(FILTER(__TmpTable,[Year]=__MaxYear && [MonthSort] = __MaxMonth),[Value])