Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 goes to the end of the year and is just flat for the final four months. I don't understand.
YTD Actual:=CALCULATE([Actual $],filter(DATESYTD(DateTable[Date]),[Actual $]>0))
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,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.