Forum Discussion

PJHos's avatar
PJHos
Advocate I
3 years ago
Solved

forecast + actual data

Hi All,   I have calculated a forecast based on historic data for the last 6 years using the below and dividing it by total years. This works fine   Forecasting - Cumulative Forecast =        ...
  • amitchandak's avatar
    3 years ago

    PJHos , do not use .date. Mark you calendar table as  date table, that option will go away

     

    Forecasting - Cumulative Forecast =
    VAR StoressOpenedLY = CALCULATE(
    [Total No Of Storess], DATEADD('Stores Attributes Calender'[Date], -1, YEAR) )

     

     

    and

     

    VAR ForecastTotal = CALCULATE([Forecasting - Cumulative Forecast], KEEPFILTERS( 'Store Attributes Calender'[Date]> [Forecasting - Last Store Opening Date]))

     

     

    also can explain need of KEEPFILTERS( 'Store Attributes Calender'[Date]> [Forecasting - Last Store Opening Date])