Forum Discussion

ValeriaBreve's avatar
ValeriaBreve
Icon for Post Partisan rankPost Partisan
3 years ago
Solved

running total from a given date

Hello, I am trying to compute a running total for a forecast per year, but not from the beginning of the year, just from the first date when there are no more actuals. It is shown in a table per mo...
  • some_bih's avatar
    3 years ago

    Hi ValeriaBreve  one of possible implementation is following:

    1. In Date table insert column with code 

    IF([Date]>=EOMONTH(TODAY(),-2)
                , TRUE,FALSE)
    2. Measure for forecast is simple sum, 
    M_forecast = sum(Sheet10[Forecast])
    Adjust Sheet10 to your table name
    3. Measure for Expected:
    M_for_Expected =
        CALCULATE([M_forecast],
        'Date'[EOM and future]=TRUE
        )
    4. Finally, measure for YTD expected amount
    M_Expected_test =
        CALCULATE(
            [M_forecast],
            DATESYTD('Date'[Date]),
            'Date'[EOM and future]=TRUE
        )
    End of Month below is column from Date column table
     I hope this help