locked
YTD to stop at RRS feed

  • Question

  • 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))

    Wednesday, November 2, 2016 11:08 PM

Answers

  • Hi AlexMartini,

    DATESYTD Function returns a table that contains a column of the dates for the year to date, in the current context. The formula given is wrong. It will calculate running total of actuals when you use DATESYTD function in filter.

    Please use the formula to calculate running total of actuals, and it will get the expected result. We can see the result highlighted is consistent after August.

    YTD Actual:=CALCULATE(SUM(Actuals1[value]),DATESYTD(Datetable[Date]))


    If you add the filter Actual[Value]>0 , the result will be cut off at August. Please review the following formula and screenshot.
    YTD Actual1:=CALCULATE(SUM(Actuals1[value]),DATESYTD(Datetable[Date]),FILTER(Actuals1,Actuals1[value]>0))


     
    If you have any question, please let me know.

    Best Regards,
    Angelia

    Thursday, November 3, 2016 10:46 AM