Forum Discussion
ammartino44
9 years agoHelper III
YTD not working
I'm looking all over the place to figure out how to get YTD numbers to stop at the last month where there is information for the month. [Actual $] below only goes to the end of August, but the YTD go...
v-sihou-msft
9 years agoMicrosoft Employee
In DAX, the DATESYTD() return the table of YTD dates in current context, which means it applies on each row. Based on your expression, I assume you want to calculate the YTD on an filtered table context. Please refer to my sample formula below:
Conditional YTD = CALCULATE(SUM('Table'[Amount]),filter(ALL('Table'),'Table'[Amount]>10 && 'Table'[Date]<=MAX('Table'[Date])))
Regards,